kabucek Posted August 22, 2006 Posted August 22, 2006 How to write a script or batch file, which compress files in a direcotry, then sends the compressed file through SmartFTP program, and then another script or batch file that check the file checksum??? How to configure SmartFTP that it can use that script for automated uploads??
Aegis Posted September 2, 2006 Posted September 2, 2006 Most of it seems possible. However, if SmartFTP doesn't have a command-line mode, there's really nothing you can do to send a file through it. Maybe if you can find a command-line alternative to the program, I could do it for you.
LLXX Posted September 2, 2006 Posted September 2, 2006 Windows has built-in FTP utility named, not surprisingly, ftp.exe. With some echo commands in a batch file to create a script for it and then redirect ftp.exe's input from the script, it is possible to automate FTP'ing.
jaclaz Posted September 2, 2006 Posted September 2, 2006 (edited) As mentioned in the SmartFTP forums:http://www.smartftp.com/forums/index.php?showtopic=5725A solution is cURL:http://curl.haxx.se/ Win32 ports are by Dirk Paehl:http://www.paehl.com/open_source/index.php?CURL_7.15.4or the (elder) ncftp and its command line side apps:http://www.ncftp.com/ncftp/jaclaz Edited September 2, 2006 by jaclaz
kabucek Posted September 6, 2006 Author Posted September 6, 2006 @echo offset /P my_folder="Please enter folder to zip and FTP: "if exist %my_folder% goto do_zfilegoto error:do_zfilecd %my_folder%rem .: if your date has '/' in the date, they need to be stripped out.for /f "delims='/'" %%i in ('%date%') doset my_date=%%i-%%j-%%kwinzip32 -min -a -p -ex -hs *.* %my_date%.zipset /P my_loc="Please enter FTP site: "set /P my_id="Please enter your ID: "set /P my_pass="Please enter your Password: "echo open %my_loc% > ftp_conn.txtecho user %my_id% %my_pass%>> ftp_conn.txtecho binary >> ftp_conn.txtecho hash >> ftp_conn.txtecho put %my_date%.zip >> ftp_conn.txtecho close >> ftp_conn.txtecho quit >> ftp_conn.txtftp -s:ftp_conn.txtdel ftp_conn.txtdel %my_date%.zipgoto done:errorecho Folder was not found.:done- This is my batch file for ftp program. I want uses that file with SmartFTP. And when I launch that file it asking me for a file… I’m typing C:\test\ - and it’s says that, the syntax of the command is incorrect. Why??? What is the correct command???
allen2 Posted September 6, 2006 Posted September 6, 2006 I would change this line echo user %my_id% %my_pass%>> ftp_conn.txt toecho user %my_id% >> ftp_conn.txtecho %my_pass% >> ftp_conn.txt
LLXX Posted September 6, 2006 Posted September 6, 2006 And when I launch that file it asking me for a file… I’m typing C:\test\... that's not a path to a file, that's a path to a directory. If the file was named 'test' and in the root, then "c:\test" would be the path to it. If you wanted the entire directory, do "c:\test\*.*"
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now