I want to copy a zip file from temp folder to a browsed location (say Destinydirectory
).
This is my code however it gives me an error:
If System.IO.Directory.Exists(My.Computer.FileSystem.CombinePath(My.Computer.FileSystem.SpecialDirectories.Temp, "IXP001.TMP")) Then
System.IO.Directory.Delete(My.Computer.FileSystem.CombinePath(My.Computer.FileSystem.SpecialDirectories.Temp, "IXP000.TMP"), True)
FileCopy = "c:\\Users\\Test\\AppData\\Local\\Temp\\IXP001.TMP\\bin.zip"
Else
FileCopy = "c:\\Users\\Test\\AppData\\Local\\Temp\\IXP000.TMP\\bin.zip"
End If
File.Copy(FileCopy, Destinydirectory)
This is the code:
System.IO.File.Copy(@"c:\\temp\\file.zip", @"c:\\destination\\file.zip");
Which kind of exception you receive?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.