I was trying to quicly solve an issue we have at the local file server where surveilance pictures are temporarily stored before being issued to central server. The problem is that the software that capture images ( that we don't have its source code ) sometimes store a picture with wrong format and extension, precisely with the same name pattern, let's say FILE1 or FILE2.
The following code was added to an existing watchguard .BAT script and works well on this regard, removing the extraneous files whereever it hapens.
However, a distinct CMD window is oppened each time the DEL command is executed:
Does someone know how to turn around that ?
In other word, we wanted to have the just oppened window closed as soon as command were executed.
( Side note: Both these 2 files are not correctly encoded with the Jpeg format, and lock issuing further pictures to central server )
The following code was added to an existing watchguard .BAT script and works well on this regard, removing the extraneous files whereever it hapens.
However, a distinct CMD window is oppened each time the DEL command is executed:
Code:
:ERASEPIC
if exist "<PATH><FILE1>" DEL "<PATH><FILE1>"
if exist "<PATH><FILE2>" DEL "<PATH><FILE2>"
timeout 3600
goto ERASEPIC
Does someone know how to turn around that ?
In other word, we wanted to have the just oppened window closed as soon as command were executed.
( Side note: Both these 2 files are not correctly encoded with the Jpeg format, and lock issuing further pictures to central server )