Exiting a batch file

Advertisement

gs1111
Guest

Exiting a batch file

I have a batch file which downloads data from a directory.
( "get -delete _MainDir/SubDir/*  D:\DestinationDir\"  )
The problem is that when there is nothing to download, the script stops and does not exit the CMD.exe dialogue.

This means that when checking every 5 minutes for data, I compound the number of cmd.exe dialogues on the screen.

I need a feature that when the system fails to find a file in the directory, the script is abandoned and I don't end up with a massive build up of cmd.exe screens

Reply with quote

Advertisement

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

Re: Exiting a batch file

The problem is that when there is nothing to download, the script stops and does not exit the CMD.exe dialogue.
That's not how WinSCP behaves on its own. It must be related to how you use/run WinSCP. We need a full example.

Reply with quote

Advertisement

You can post new topics in this forum