Hi,
I am trying to run the a scheduler that executes a batch file.In this batch file I am trying to run synctoy application and the application runs successfully. The scheduler runs successfully. I want to add a script in batch file that exit the command prompt once synctoy synchronization is completed, not before the completion. Here is my code

@echo on
C:
cd C:\Program Files\SyncToy 2.1
SyncToyCmd -R > D:\logs\sync_logs.txt

Can anyone tell me that how can I exit the command prompt when the sync_logs.txt is updated not before that.
Thanks in advance.

Recommended Answers

All 2 Replies

back in the day, I would use the call command to run an additional batch program and wait until it was completed before continuing the current program. Not sure if it will work for you in this case, but give it a try..

@echo on
C:
cd C:\Program Files\SyncToy 2.1
call SyncToyCmd -R > D:\logs\sync_logs.txt

Place exit at the end of the batch file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.