We help IT Professionals succeed at work.

MS DOS BATCH FTP File Change Directory

Hi,

I have some code (below) the code copies the first file but not the second file which is in another directory. I used cd.. to go back one directory the cd ilink_constituents which is whre the file I wish to copy is. The DOS screen say invalid command which I think is to do with cd..

Any help would be great thanks

Mark

@echo off
(echo open data.ftse.com
echo user username password
echo cd data
echo cd gilts
echo cd gilts_constituents 
echo mget *BGCO*.csv
echo cd..
echo cd ilink_constituents
echo mget *ILCO*.csv
echo quit
) | ftp -n -i

Open in new window

Comment
Watch Question

Commented:
It should be

cd ..

(don't leave off the blank between cd and the dots).

Author

Commented:
great thanks!