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 am pretty new to this tool and am loving it so far. Thank You for the great product.

To make my automated scripts more useful, I need to provide the path to change directories dynamically. Is there a way to do this? Below is an example of how i am trying to code it, but it didnt work.
Code: Select all$srcpartyid = "qparty3" $destpartyid = "qparty4" CHDIR("/sft/client_files/$srcpartyid/my_outboxes/$dest_partyid")
ERROR RECEIVED:
***** CHDIR Error #550: Cannot change current remote directory to /sft/client_files/$srcpartyid/my_outboxes/$dest_partyid.
***** The server said: /sft/client_files/$srcpartyid/my_outboxes/$dest_partyid: No such file or directory.


Please let me know if this is possible. It would be a huge help. Also a separate question would be, is it possible to supply parameters when creating a batch file and trying to execute the ftp scripts? I havent tried it yet, but was curious. Each script i have writted would need different parameters and they often keep changing, hence i wanted to create more dynamic scripts.

Thanks for all your help. Appreciate your timely response.
Hi,

I figured out how to do this. Here is the code that works-
Code: Select all$srcpartyid = "qparty3" $destpartyid = "qparty4" CHDIR("/sft/client_files/" .$srcpartyid. "/my_outboxes/" .$destpartyid)
Thanks
Hi Smita,

As you have figured, the variable names are not expanded to its contents when used between quotes (as PHP does). Feel free to post here again if you need more help.