ftp / mls problems

B

bic1ster

I am trying to run an ftp script that first gets file listing. then
parses that file in a for loop to create the get commands, then runs
the get script.

I first get a file listing on ftp server:

mls yourfiles*.csv files.log

files.log:
yourfiles_200602021232.log
yourfiles_200602031100.log

Then I parse that files.log:

FOR /F "tokens=*" %%I IN (FILES.LOG) DO ECHO GET %%I>>GET.TXT

the output of this is:
D:\JOBS\mykmbs-terms>FOR /F "tokens=*" %I IN (FILES.LOG) DO ECHO GET %I
1>>GET.T
XT

1>>GET.TXT bs-terms>ECHO GET yourfiles_2006021232.csv

My get.txt looks like this:

get yourfiles_200602021232.log
get yourfiles_200602031100.log


When the ftp runs, I get this (only one shown for brevity):

ftp> GET yourfiles_200602021232.log
..rror opening local file yourfiles_200602021232.log
:Invalid argumentms_200602021232.csv

====
This is on Win2k SP 4 and Win2K SP 4 FTP server. I can copy/paste the
get commands into ftp terminal and they work fine.

I did see at one point what looked like an extra carriage return, but I
don't see that in any of the files.

I have another script that runs fine with a for /f in files.log, but
the files.log was created by me in Win XP.

Any ideas would be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top