Цитата:
+ гарантированно работает под любой виндой
|
Код:

Option Explicit
Dim strSourceFile, strDestinFile, FSO, WshShell
Const OverwriteExisting = False
set FSO = CreateObject("Scripting.FileSystemObject")
set WshShell = WScript.CreateObject("WScript.Shell")
strSourceFile = "C:\testfile.dat"
strDestinFile = WshShell.SpecialFolders("Desktop") & "\" & "test.dat"
rem On Error Resume Next
If Not FSO.FileExists(strDestinFile) Then
FSO.CopyFile strSourceFile, strDestinFile, OverWriteExisting
End If