Can you post an output of the command on console?
would it work, if you use:
winscp3 scp://myusername:mypassword@myhostname/myremotepath /script=script.txt
and script.txt contains
Here's the output,
C:\Temp>winscp3.com scp://user1:firstname.lastname@example.org/pub/data /command "put file1.txt"
Searching for host...
Connecting to host...
Using username "user1".
Authenticating with pre-entered password.
Starting the session...
Reading remote directory...
Active session:  email@example.com
It does work with if I create a "script.txt" file that contains put C:\file1.txt. However, I would prefer not to do that since I'm trying to run this command from within a PERL script.