Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: 'call' command in script causes reauthentication

Please read documentation. If that does not help, come back.
markgeb

'call' command in script causes reauthentication

I am new to scripting WinSCP, so I expect I am missing something. Here is the script I am trying to use. It works until the point where I issue call chgrp .... At this point I need to re-authenticate. Am I missing something, doing something wrong, or is this just how it works?

Thanks,

Called from dos command line, via /script=.

option echo on
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open username@host
 
# Change remote directory
cd /path/test
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
# get examplefile.txt d:\
 
rm GLB_en_urg_00843_manual_ATG/*.*
rmdir GLB_en_urg_00843_manual_ATG
 
put S:\UserProd\translations\urg_00843\GLB_en_urg_00843_manual_ATG
 
chmod 774 GLB_en_urg_00843_manual_ATG
chmod 774 GLB_en_urg_00843_manual_ATG/*.*
call chgrp dctmtmp GLB_en_urg_00843_manual_ATG
call chgrp dctmtmp GLB_en_urg_00843_manual_ATG/*.*
 
# ## commented out close and exit for debugging...
# Disconnect
close
# Exit WinSCP
exit