|
-
Nov 29th, 2002, 04:44 AM
#1
Thread Starter
Frenzied Member
How to copy, paste and rename a file without opening it
In my application i need to search for a file in a special folder, make a copy of it, save it to a desired location and then rename it, (or first rename it and then save it) without opening the file. How can i accomplish that?
Thanks
-
Nov 29th, 2002, 05:37 AM
#2
Registered User
This should work I guess...
Code:
Dim f As New System.IO.FileInfo("D:\winter.jpg")
f.CopyTo("D:\Test\winter2.jpg")
You have to create the new folder (Test in this example) if it doesn't exist or else you will get an error.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|