display log in Command Prompt RRS feed

  • Question

  • I am trying to run a backup of the "My Pictures" folder to a USB stick via a batch file I store on the desktop. I can get SyncToy to run but I would also like the command window to display SyncToy's output and then echo a statement to say it is complete.

    I have tried 3 ways to do this and the only way is to run everything via the command prompt (i.e. open a command prompt, find .bat file and run it). If I run the bat file via Task Scheduler or double clicking on it in Windows Explorer the command prompt closes when finishing executing the line of running SyncToy "C:\Program Files\SyncToy 2.1\SyncToyCmd.exe" -R "backup name". Does anyone know a way I can get a prompt as to whether I want the backup to complete, run SyncToy and then display the output.

    My batch file consists of:

    @echo off
    SET /P ANSWER=Do you want to run backup (Y/N)?

    if /i {%ANSWER%}=={y} (goto :yes)
    goto :no
    echo Backup running
    "C:\Program Files\SyncToy 2.1\SyncToyCmd.exe" -R "backup name"
    echo Backup complete

    exit /b 0
    echo Backup cancelled
    exit /b 1

    Sunday, June 10, 2012 4:01 PM