Topic "Closing the shell command after running a myScript.bat file"

Author Message
sy272951

Guest


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
sy27295
[View user's profile]

Joined: 2013-12-04
Posts: 12
Location: Boston, USA
"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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
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.


Quote:
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:
Code:
-filemask=""*_REJECT_*""" "exit"

_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License