ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Need help writing a script? Have any question about ScriptFTP?
Hi,
I want to transfer a file from one system to another system.To achieve this i'm calling the FTP Script(script.txt) using batch file(scriptcall.bat).
Here i want to send file name and file path values to FTP Script from Batch file.
I'm little bit confusing on how to pass values to the script file.
Please help me to resolve this issue..

Thanks,
SK
Hi there,

It is very easy. For example, if you call ScriptFTP.exe this way:
ScriptFTP.exe myscript.ftp "C:\myfilepath\myfilename.zip"
Then you can retrieve the full filename and path with GETPARAM:
Code: Select all# This is myscript.ftp $param3 = GETPARAM(3) PRINT("Uploading file ".$param3) OPENHOST("127.0.0.1","carl","123456") PUTFILE($param3) CLOSEHOST
You can find further info about GETPARAM here:

http://www.scriptftp.com/reference.php?go=topic153
Hi,

Sorry,This is not what i'm expecting.
Let me explain step by step.
1) i have one script file holding FTP commands to transfer files from one system to another.
2) i have another script file to do some operations. (I can't place a single file for both of these operations)
3) I'm calling these two scripts using the following cmd from the batch file:
ftp -s:xx.txt localhost
4) Now when i'm executing batch file from cmd prompt..i can pass the value to the batch file..That value should reach the FTP script file..

Please help me....

Thanks,
SK
Hi,

This forum is for ScriptFTP, not for the plain old command line ftp program that comes with windows, sorry. I don't really know how to pass values in this case... Actually, I think it is not supported.

If any user of this forum have an idea of how to do that they of course can post here. This is an open forum.