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

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:               *
rem  *                   e-mail:                 *
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\
echo *   quit
echo *
ftp -s:upwip001.txt
The following is a listing of the contents of the text file (UPWIP001.TXT).
cd /web
put d:\simoweb1\cbltxn01.htm
put d:\simoweb1\
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

The contents of script.txt might look like this:

cd /files 

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


make script.txt contain :
cd /nubatur
put D:\FileName.rar

execute d:\script to transfer file in script txt to

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

The output should be like this below

Connected to
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:/
User (
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