manoire
asked on
ftp script won't lcd
Hello.
I'm working on an ftp script to automate the update to a machine. I've got everything working but one aspect of it, and that is lcd. Can anyone see what I am doing wrong? Thanks! manoire
Here it is:
@echo off
echo user xxxxxxxx> ftpcmd.dat
echo xxxxxxxx>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo lcd /c:\My Start/>>ftpcmd.dat
echo get config.txt>> ftpcmd.dat
echo get mainnopointer.exe>> ftpcmd.dat
echo get mainpointer.exe>> ftpcmd.dat
echo get alldata.zip>> ftpcmd.dat
echo get unzip.exe>> ftpcmd.dat
echo get update_step2_0204.bat>> ftpcmd.dat
echo lcd /c:\My Start\maintenance/>>ftpcmd .dat
echo get scheduled_maintenance_choo se_engine. swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get scheduled_maintenance_choo se_miles.s wf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get scheduled_maintenance_choo se_model.s wf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get scheduled_maintenance_sche dule_grid. swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo lcd /c:\My Start\video/>>ftpcmd.dat
echo get gemini_dog_brakes.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get gemini_dog_brakes_framed.s wf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get gemini_girlfriend.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get gemini_girlfriend_framed.s wf>> ftpcmd.datecho quit>> ftpcmd.dat
echo lcd /c:\My Start\information_center/> >ftpcmd.da t
echo get information_center.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo lcd /c:\My Start\screen_saver/>>ftpcm d.dat
echo get screen_saver.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get screen_saver.xml>> ftpcmd.datecho quit>> ftpcmd.dat
echo quit>> ftpcmd.datecho quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat www.xxxxxxxxxxxxx.com
del ftpcmd.dat
I'm working on an ftp script to automate the update to a machine. I've got everything working but one aspect of it, and that is lcd. Can anyone see what I am doing wrong? Thanks! manoire
Here it is:
@echo off
echo user xxxxxxxx> ftpcmd.dat
echo xxxxxxxx>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo lcd /c:\My Start/>>ftpcmd.dat
echo get config.txt>> ftpcmd.dat
echo get mainnopointer.exe>> ftpcmd.dat
echo get mainpointer.exe>> ftpcmd.dat
echo get alldata.zip>> ftpcmd.dat
echo get unzip.exe>> ftpcmd.dat
echo get update_step2_0204.bat>> ftpcmd.dat
echo lcd /c:\My Start\maintenance/>>ftpcmd
echo get scheduled_maintenance_choo
echo get scheduled_maintenance_choo
echo get scheduled_maintenance_choo
echo get scheduled_maintenance_sche
echo lcd /c:\My Start\video/>>ftpcmd.dat
echo get gemini_dog_brakes.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get gemini_dog_brakes_framed.s
echo get gemini_girlfriend.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get gemini_girlfriend_framed.s
echo lcd /c:\My Start\information_center/>
echo get information_center.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo lcd /c:\My Start\screen_saver/>>ftpcm
echo get screen_saver.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get screen_saver.xml>> ftpcmd.datecho quit>> ftpcmd.dat
echo quit>> ftpcmd.datecho quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat www.xxxxxxxxxxxxx.com
del ftpcmd.dat
ASKER
Tried it, and it uploaded the file to file name "quit"
I did:
echo lcd "c:\My Start\maintenance">>ftpcmd .dat
echo get scheduled_maintenance_choo se_engine. swf>> ftpcmd.datecho quit>> ftpcmd.dat
From what i can see the lcd worked now, but my next line, the get statement has an error.
Suggestions?
I did:
echo lcd "c:\My Start\maintenance">>ftpcmd
echo get scheduled_maintenance_choo
From what i can see the lcd worked now, but my next line, the get statement has an error.
Suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
^ ^
Remove / from start and end.
Also enclose directory name in double quotes " " if is contains any space.
Like:
echo lcd "c:\My Star" >>ftpcmd.dat