Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
File transfer using Shell
Mike,
In the batch file on the ftp command put the full path to the command file or try changing drive and directory to the batch file in the batch file. where the command file is. -- Hope this helps Martin Fishlock Please do not forget to rate this reply. "Mike" wrote: Hi, I'm not sure if this is an Excel question or an FTP one but in either case any help would be appreciated. I import files from a server onto my PC using these commands within a .bat file called "import wams files.bat:- cls echo on ftp -s:locquery.cmd incfam incfam is the server and the .cmd file contains the actual files to get:- cd /users/synergy/kemira/live/data get LOFILE11 o:\products\wams\lofile11 get LOFILE12 o:\products\wams\lofile12 get LOFILE18 o:\products\wams\lofile18 get LOFILE19 o:\products\wams\lofile19 get LOFILE20 o:\products\wams\lofile20 get LOFILE22 o:\products\wams\lofile22 bye It all works perfectly if a simply double click the .bat file but if I call it from within Excel using:- Sub getfiles() Dim returnedvalue returnedvalue = Shell("o:\products\wams\import wams files.bat", 1) End Sub The .bat file runs but the files aren't copied. Once again any thoughts would be appreciated. Mike |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Shell To Get File Info | Excel Programming | |||
Shell to different app then open file within | Excel Programming | |||
Shell command and exe file conundrum | Excel Programming | |||
Batch file in Shell Function | Excel Programming | |||
Copying a file with VBA (or with a SHELL command) | Excel Programming |