|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How To Force Copy One File To AnotherIf I want to copy one file to another how do I do that? I want to do
this even if the second file already exists. Thanks, Christopher Lusardi Try
File.Copy ( "C:\ahhh\ohhh\eeeee\bbboooo\myfile.poo", "C:\ahhh\ohhh\eeeee\aaaaeeee\myfile.poo", True ) Finally End Try Show quoteHide quote "Christopher Lusardi" <clusard***@aol.com> wrote in message news:1148561217.588575.149470@i40g2000cwc.googlegroups.com... > If I want to copy one file to another how do I do that? I want to do > this even if the second file already exists. > > Thanks, > Christopher Lusardi > To force copy in VB, I use:
fso.FileCopy src dest true Where: fso - file system object I created earlier ..FileCopy - the command to copy a file src - variable w/ the source file full path/name dest - variable w/ the destination file full path and name true - Boolean to determine overwrite status. One problem this could run into is permissions, another is if one of the files is in use by another process. Except that this is Vb.Net and the FileSystemObject is obsolete. Just
use the classes in the System.IO namespae as Robin suggested.
Problem loading XML
Application.Exit datagrid current record Possible to monitor changes in array (with event)? Debug.WriteLine Doesn't Produce Output How do I add a MSI file to Prerequisite list? Stripping just the filename Re: How to Use a Screen Saver app within My Application? word automation How To Use Operating System. E.G.:How To Delete A File On C Disk |
|||||||||||||||||||||||