Link to home
Start Free TrialLog in
Avatar of manoire
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_choose_engine.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get scheduled_maintenance_choose_miles.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get scheduled_maintenance_choose_model.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get scheduled_maintenance_schedule_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.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get gemini_girlfriend.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo get gemini_girlfriend_framed.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo lcd /c:\My Start\information_center/>>ftpcmd.dat
echo get information_center.swf>> ftpcmd.datecho quit>> ftpcmd.dat
echo lcd /c:\My Start\screen_saver/>>ftpcmd.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
Avatar of Farhan Kazi
Farhan Kazi
Flag of Australia image

echo lcd /c:\My Start/>>ftpcmd.dat
              ^                 ^
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

 
Avatar of manoire
manoire

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_choose_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?
ASKER CERTIFIED SOLUTION
Avatar of Farhan Kazi
Farhan Kazi
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial