Computing.Net > Forums > Disk Operating System > command line ftp

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

command line ftp

Reply to Message Icon

Name: Cameron
Date: July 10, 2000 at 16:15:12 Pacific
Comment:

Is there a dos ftp program that runs with command line switches (ex: pkzip25.exe -add C:\file.txt)



Sponsored Link
Ads by Google

Response Number 1
Name: Hari
Date: July 20, 2000 at 21:49:48 Pacific
Reply:

I wrote a batch file for frequent up/downloads. Saves me time. Does this help?
Just replace the the stuff inside #...# with your data. If someone's got something better, or have the time to make this script intelligent -- I'd like to hear. Cheers!

::Run ftp client to fetch data from #host#
::Use for one-off data transfer
::hari -- 27/06/2000
::Name this file #host#.bat
@echo off

if "%1"=="" goto showHelp
set transactionType=%1
set transactionMode=%2
set localDirectory=lcd %3
set hostDirectory=cd %4
set fileName=%5

echo user #user# #password# >ftpCmds.tmp
echo %localDirectory% >>ftpCmds.tmp
echo %hostDirectory% >>ftpCmds.tmp
echo %transactionMode% >>ftpCmds.tmp
echo %transactionType% %fileName% >>ftpCmds.tmp
echo close >>ftpCmds.tmp
echo bye >>ftpCmds.tmp

ftp -v -i -n -s:ftpCmds.tmp #host_name# >nul

del ftpCmds.tmp
echo transfer complete...
set transactionType=
set transactionMode=
set localDirectory=
set hostDirectory=
set fileName=
goto endFtp

:showHelp
echo usage: #host# ((m)get or (m)put) (asc or bin) localdirectory hostdirectory filename

:endFtp


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: command line ftp

Command line entries for GHOST www.computing.net/answers/dos/command-line-entries-for-ghost/7715.html

Re-Command line/GUI www.computing.net/answers/dos/recommand-linegui/1685.html

DOS command line help needed www.computing.net/answers/dos/dos-command-line-help-needed/14756.html