Very simple way to check/copy a file
Very simple way to check/copy a file
Rate Very simple way to check/copy a file
(2(2 Vote))
Dim fso
Dim strFile As String
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists("c:\windows\Calc.exe") Then
FileCopy "c:\windows\Calc.exe", "c:\windows\desktop\Calc.exe"
MsgBox "The program Calc.exe has been copied to your desktop. You can edit the file paths in the code to run how you want it to.", vbInformation, "Notice"
Else
MsgBox "The file you are trying to copy does not exist.", vbCritical, "Error"
End If
End Sub
Very simple way to check/copy a file Comments
No comments yet — be the first to post one!
Post a Comment