Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ftp batch script in one file 1

Status
Not open for further replies.

hyy1109

IS-IT--Management
Dec 16, 2002
27
US
Can anyone please provide me a batch ftp script in one file?

The following sample is puts the login part into another file: . But I just need ftp and login part into one batch file.

Thanks.
 
Hello hyy1109,

The usual way is to make the source file on-the-fly (with some exotic name to avoid accidentally overwrite some useful file and to locate it at %temp% directory or somewhere else). This is how to replicate what advised in q96269.
Code:
@echo off

::set some exotic unique file name
set tmpfile=%temp%\[blue]someexoticfilename.scr[/blue]

echo open 11.11.11.11>%tmpfile%
echo user>>%tmpfile%
echo guest>>%tmpfile%
echo guest>>%tmpfile%
echo put file 1>>%tmpfile%
echo quit>>%tmpfile%
ftp -s:%tmpfile%

del %tmpfile%
set tmpfile=
regards - tsuji
 
tsuji,

You are a bad boy. This should not count given the original poster's question.

I like your solution.

A star sir.

Bill


 
LOL!... Thanks for the vote, Bill. -tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top