Ads 468x60px

Smaller time frame always follow the bigger time frame. It's better wait be patience to enter in position than risk with BIG SL. Having strong trading discipline and taking losses when necessary is a sign of serious trading approach
Subscribe:

Labels

Monday, May 7, 2012

Making Batch FTP Upload

The following batch file (UPWIP001.BAT) will start an FTP session and pass the name of a text file (UPWIP001.TXT) to the FTP program. This text file will be processed by the FTP program and each of the statements in the text file will be processed in the sequence they appear.
@echo OFFrem  * *******************************************************************
rem  *               FTPSAME1.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Enterprises          *
rem  *           (C) Copyright 1987-2011 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************echo *
echo * This batch and text file illustrate the use of FTP to upload an
echo * ASCII file and an EBCDIC or Binary file. The UPWIP001.BAT file
echo * references UPWIP001.TXT that contains...
echo *
echo *   user
echo *   password
echo *   cd /web
echo *   pwd
echo *   ascii
echo *   put d:\simoweb1\cbltxn01.htm
echo *   binary
echo *   put d:\simoweb1\cbltxn01.zip
echo *   quit
echo *
ftp -s:upwip001.txt www.simotime.com
The following is a listing of the contents of the text file (UPWIP001.TXT).
user
password
cd /web
pwd
ascii
put d:\simoweb1\cbltxn01.htm
binary
put d:\simoweb1\cbltxn01.zip
quit
 
-----------------------------------------------------------------
 
 
I found this Microsoft KB article today 96269 which shows you how to use the ftp program that comes with all versions of windows an automate a file transfer.

ftp -s:script.txt ftp.server.com


The contents of script.txt might look like this:

yourUserName 
yourPassword 
bin 
cd /files 
put file.zip 
bye 

This is handy for administration between servers, but keep in mind that FTP sends passwords in clear text.

------------------------------------------------------------------------------

make script.txt contain :
 ------------------
userName
Password
binary
cd /nubatur
put D:\FileName.rar
bye
 ----------------------


execute d:\script to transfer file in script txt to ftp.drivehq.com

C:\>ftp -s:d:\script.txt ftp.drivehq.com

The output should be like this below


Connected to ftp.drivehq.com.
220 Welcome to the most popular FTP hosting service! Save on hardware, software,
 hosting and admin. Share files/folders with read-write permission. Visit http:/
/www.drivehq.com/ftp/;
User (ftp.drivehq.com:(none)):
331 User name ok, need password.

230 User logged on. Free service has restrictions and is slower.
ftp> binary
200 Type set to I
ftp> cd /nubatur
250 CWD command successful. "/nubatur" is current directory.
ftp> put D:\ElabmediaTranspBckgrnd.rar
200 Port command successful.
150 Opening BINARY mode data connection for file transfer.
226 Transfer complete
ftp: 47864 bytes sent in 2.87Seconds 16.68Kbytes/sec.
ftp> bye
221 Bye






 
comments