Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: Copy file with scheduled tasks

HTVi
TV Discussion Newsgroups

Copy file with scheduled tasks
"RandyH" <RHollaw[ at ]HOTmail.com> 4/20/2007 3:38:32 PM
trying to create a scheduled tasks to copy a file from a remote server to a
local server.

I've mapped the drive to the remote server as Y:

Const OverwriteExisting = TRUE

Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "Y:\Source\MyFile.txt" , "D:\Destination\",
OverwriteExisting

The file seems to copy, the file sizes match up, but when you try to open
the file, it says it's corrupt.

Scheduled tasks reports a status value of:
"test.job" (FileCopy.vbs)
Finished 4/19/2007 8:36:20 AM
Result: The task completed with an exit code of (40010004).

I can do the file copy using a batch file and it works.

what am I doing wrong?




Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen