URGENT - "put -nopreservetime" in script does not work, HELP

Advertisement

rmundkowsky
Joined:
Posts:
6

URGENT - "put -nopreservetime" in script does not work, HELP

Hi, I am using 4.1.8. in interactive command line interface mode, the commands listed below work. But if I put them into a script file and run them then Winscp thinks -nopreservetime and –nopermissions are file names rather than an option. I am using SFTP. I would note that we are using the old INI file that can with version 3, not sure if that makes a difference.

SCRIPT:
option batch on
option batch abort
option confirm off
open AAAA:BBB@XYZ.com
lcd C:\temp\t
lls
cd IN
put -nopreservetime –nopermissions "test.zip"
ls
bye
PARTIAL OUTPUT FROM LOG:
...
. 2009-03-24 11:34:01.134 Asking user:
. 2009-03-24 11:34:01.134 File or folder '–nopermissions' does not exist. ()
* 2009-03-24 11:34:01.149 (EScpSkipFile) File or folder '–nopermissions' does not exist.
. 2009-03-24 11:34:01.149 Closing connection.
. 2009-03-24 11:34:01.149 Closing connection.
Command line usage:
"c:\Program Files\WinSCP\WinSCP.com" AAAA:BBB@XYZ.com /ini=z:\Admin\INI_files\WinSCP3.ini /script=s.txt /log=test.log

Reply with quote

Advertisement

rmundkowsky
Joined:
Posts:
6

Re: URGENT - "put -nopreservetime" in script does not work, HELP

Found a work around which is to use a INI file with the following, but I think this is a bug that you should still address.
FileNameCase=0
PreserveReadOnly=0
PreserveTime=0
PreserveRights=0
IgnorePermErrors=1

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: URGENT - "put -nopreservetime" in script does not work, HELP

Are you sure you are using the same version of WinSCP when run interactively and when running the script?
There may also be some syntax problem in the script. I've noticed that in the post the dash before nopreservetime is different to the one before nopermissions. And as WinSCP does report the error for nopermissions although it is only after nopreservetime, I guess it may be the actual problem.

Reply with quote

rmundkowsky

incorrect character - my mistake, good catch

Wow,

Good catch. By some strange accident, I used a 0x96 rather than a 0x2D for a dash. Weird, I thought I was using a Ascii Text file for the script, but I guess it is an Unicode file.

Reply with quote

Advertisement

You can post new topics in this forum