I’m having a few difficulties trying to pass arguments into a ftp script via Powershell and I hope some of you guys may be able to help me out.
From a powershell script I’m invoking an FTP script with the following command:
The FTP script is below and works fine if I call it from DOS.
open <IP ADDRESS HERE>
cd <DIRECTORY TO DESTINATION >
lcd <DIRECTORY TO SOURCE >
(%1 = username, %2 = password, %3 = file)
I know how to pass arguments to a normal .bat file but because of the way powershell calls an FTP script it wont work L Now I’ve looked high and low for a solution and I don’t want to do anything querky such as create the FTP script and run within the script inclusive of the parameters.
Any help would be much appreciated!
you can try script from sylvain at below link
check out the below link