Closing the shell command after running a myScript.bat file

Advertisement

sy272951
Guest

Closing the shell command after running a myScript.bat file

I run a command line login to an sFTP site + synchronizing local folder against the remote one with a mask

Two outstanding issues
a) could not figure out a way of "comparing" be limited to the remote (folder) /OUT that I want... it basically goes creates similar folder structure locally at /ROOT level and scans thru all folders under the /ROOT while /OUT is being just one of them.
b) After the synch process.... the command window sits with
winscp>
even though I tried "exit" and/or "quit" at the end of the command line.
So, I cannot close the command window during the automated downloads

I know these are simple issues.... but any help will be so appreciated.

Best Regards
Cornelia / Boston, USA

Reply with quote

Advertisement

sy27295
Joined:
Posts:
11
Location:
Boston, USA

Re: Closing the shell command after running a myScript.bat file

"C:\Program Files (x86)\WinSCP\WinSCP.com" /command "option batch abort" "option confirm off" "open sftp://MYUSERID:MYPASSWORD@SFTPSITE.REMOTESERVER.ORG" "cd /OUT" "synchronize LOCAL \\cornelia1\e\data\irxData\OUT /OUT -filemask="*_REJECT_*""" "exit"

This is what I am sending to the command shell window, but it stays at
winscp>
... after resyncing with local directory.
I want it to get out of winscp to
C:\>
so that the CMD window will close (or will be closed by the running VB script).

Best Regards
Cornelia / Boston, USA

Reply with quote E-mail

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

Re: Closing the shell command after running a myScript.bat file

sy272951 wrote:

a) could not figure out a way of "comparing" be limited to the remote (folder) /OUT that I want... it basically goes creates similar folder structure locally at /ROOT level and scans thru all folders under the /ROOT while /OUT is being just one of them.
Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.

b) After the synch process.... the command window sits with
winscp>
even though I tried "exit" and/or "quit" at the end of the command line.
So, I cannot close the command window during the automated downloads
You seem to have quotes wrong. You should have double double-quote after the -filemask=. I.e. the trailing part should be:
-filemask=""*_REJECT_*""" "exit"

Reply with quote

Advertisement

You can post new topics in this forum