Tuesday, July 17, 2012

FTP test windows script

The below batch file FTPtest.bat will call the Test.scr / Test2.scr / Test2.scr to test the ftp site continuously.

 FTPtest.bat 

 @echo ON 
FOR /L %%n IN (1,1,20000) DO ( 
ftp -s:Test1.scr 
) >> out1.txt 2>&1 

Test.scr 

open ftpserver 
ftpserver\username 
password 
!echo %time% 
cd /temp 
!echo %time% 
bye 

Test1.scr

open ftpserver 
ftpserver\username 
password 
!echo %time% 
cd /data/d/prod 
!echo %time% 
cd /temp1/d/prod 
!echo %time% 
bye 

Test2.scr 

open ftpserver 
ftpserver\username 
password 
cd test 
mput GDF.zip 
delete GDF.zip 
bye

No comments:

Post a Comment

Followers