Computer Science Canada

Copying a File

Author:  awesomej01 [ Sat Apr 24, 2004 9:16 pm ]
Post subject:  Copying a File

For my final school project, I plan to make a word processor. I was wondering if someone can post an example to show me how to use the command File.Copy

Author:  Delta [ Sat Apr 24, 2004 10:23 pm ]
Post subject: 

code:
File.Copy ("c:\file.txt", "c:\newfile.txt")


boom... that takes a the file "file.txt" and copies it as "newfile.txt"

Author:  Raugrist [ Sun Apr 25, 2004 5:40 am ]
Post subject: 

And if you don't know where the file you want to copy will be (but you know it's in the same directory as the turing file), you should be able to use:
File.Copy (Dir.Current + "/file.txt", "c:/newfile.txt")


: