General discussion

Locked

FTP Batch File Script in Windows 2000

By BorgInva ·
I am trying to get a batch file to FTP out and copy a file on Windows 2000 Server. The batch works except for the FTP part. I looked at a few sites and I am doing what they say.
==============================
This is where the FTP plays in the main batch:

ftp -s:homiftp.txt
==============================
In that file I have:

ftp xxx.xxx.xxx.xxx
login
password
cd patch
get callanalyzer.exe
quit
==============================
When the batch file gets to that file, this is what I keep getting:

C>ftp -s:homiftp.txt
Error opening script file homiftp.txt.
Transfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.
==============================
I have tried variations of trying to get this to work but I keep running into that error. Any ideas on what simple bit I am missing?

Thanks.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by lowlands In reply to FTP Batch File Script in ...

two things, make sure the file can be found, before running it, try doing a cd to the directory where the file is located.

and i think the first line of your file should say

open xxx.xxx.xxx.xxx

Collapse -

by BorgInva In reply to

Sorry but I finally figured it out. More or less. They work within a folder but not from the desktop (which is just another folder). I can not explain it but I put the files in c:\temp, take out all references of a directory from the batch and the txt file works. No idea why but that is how I got it working.
Thanks for trying, but I did not have to change anything in my txt file.

Collapse -

by BorgInva In reply to FTP Batch File Script in ...

I should clarify that the batch never logs into the FTP. It never gets that far.

Collapse -

by BorgInva In reply to FTP Batch File Script in ...

Also, just manually typing:

ftp -s:homiftp.txt

Produces that error:

Error opening script file homiftp.txt.
Transfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.

Collapse -

by BorgInva In reply to FTP Batch File Script in ...

This question was closed by the author

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums