Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Новый участник


Сообщения: 6
Благодарности: 4

Профиль | Цитировать


Цитата:
+ гарантированно работает под любой виндой
Код: Выделить весь код
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

Отправлено: 18:56, 26-07-2012 | #7