Running Command Processor from .bat

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
sburnay
Posts: 1
Joined: 24 Oct 2011 05:09

Running Command Processor from .bat

#1 Post by sburnay » 24 Oct 2011 05:26

Hi!
First of all, thank tou for contributing for this forum.

Bellow it's a copy of a very simple .bat file which backs up data from my windows Workstation to my Ubuntu server.

The command ran within the .bat launches a 'Windows Command Processor' which prompts for a password, and that works fine.

Problem is that I want the 'Windows Command Processor' window to keep opened after the command executes (so I get to check the feedback), but that window closes automatically.

Should I use some kind of 'wait' command/argument?

P.S. This .bat is ran by a .vbs, in a manner that I can get user interaction with check buttons, should the corrections be made there?

Code: Select all

@ECHO OFF

SETLOCAL
SET CWRSYNCHOME=%PROGRAMFILES(x86)%\CWRSYNC
SET CYGWIN=nontsec
SET HOME=%HOMEDRIVE%%HOMEPATH%
SET CWOLDPATH=%PATH%
SET PATH=%CWRSYNCHOME%\BIN;%PATH%

rsync -r /cygdrive/c/backups/ sburnay@172.30.10.81:/home/sburnay/work/


With my best regards,
sburnay

aGerman
Expert
Posts: 4705
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Running Command Processor from .bat

#2 Post by aGerman » 28 Oct 2011 11:03

What about the PAUSE command?

Regards
aGerman

Post Reply