Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: error 1009
I get this to I've tried debug(1) it hangs at File copy.
FileCopy: FROM file open failed winbatch 32 97B WIL Version:2.4bbpI no its' not the script it worked fine for 1 3/4 years till put win98.then all my filecopy("Stopped", "Working") sometimes get
Error 1008 Error 1009 Error 1010 FileCopy: FROM file open failed...Most have FILE open failed somewhere in error line. Here's my code:
FileCopy("C:\autoexec.bat", "C:\*.bak") a=C:\"autoexec.bat" b=C:\"autoexec.bak" FileCopy(a,b,);will not workAny suggestions on how to get around this problem?
1009 indicates the script does not like the source file. The problem may revolve around doing a FileItemize on a non-current directory, and then not prepending that directory to the file name in the generation of the currfile variable. Check that.
The list of filenames returned by FileItemize does not include pathnames. If you are working with anyting other than the current path, then your script must take this into account.
I tried:
FileCopy("C:\autoexec.bat", "C:\*.bak",0) FileCopy("C:\autoexec.bat", "C:\autoexec.bak", @false) Message("It","Worked")It seems to work perfectly under windows 98.
None of the examples you provided could possibly work.
filecopy("Stopped", "Working") Missing third parameter FileCopy("C:\autoexec.bat", "C:\*.bak") FileCopy("C:\autoexec.bat", "C:\autoexec.bak", @false) First FileCopy missing third parameter a=C:\"autoexec.bat" b=C:\"autoexec.bak" FileCopy(a,b,);will not work Double quotes for a and b variables misplaced.
PhonePath="M:\CSS32\CSS\tools\Script" PhoneEXE="PhoneLst.lnk" FileCopy("%PhonePath%\%PhoneEXE%","%Profiles%\%User%\DeskTop\%CSSWork%\Tools\Admin\CSSP Phone List.LNK", @False)Can you tell my why this doesn't work? I am copying a shortcut that is not in use. The access database the shortcut is referencing is and will be in use. The shortcut properties for the PhoneEXE=PhoneLst.lnk are as follows:
M:\WIN32\OFFICE\OFF97SR1\SERVER\MSOFFICE\OFFICE\MSACCESS.EXE "S:\Production Facing Team\PR Batch\Transitioning\ShiftOps\TrainTrax.mdb" /x AltOpen.I can execute from a manually created shortcut just fine. I am doing a file copy because if I don't, winbatch automatically puts quotes around the target path specifying msaccess with paramters because that's how windows normally likes it, but it doesn't work with the quotes. Doing a shortcutmake I also get the problem of being greater than 256 chars.
Why doesn't the file copy work?
I presume the pointed to file is not installed yet and thus the filecopy fails.
LNK files take special handling as in many cases the target file is used instead of the lnk file itself.
Article ID: W12930
Filename: 1009 FileCopy FROM File Open Failed.txt
File Created: 2001:01:25:15:52:24
Last Updated: 2001:01:25:15:52:24