vbscript calling svnadmin dump
Posted
by Dexton
on Stack Overflow
See other posts from Stack Overflow
or by Dexton
Published on 2010-03-09T03:53:01Z
Indexed on
2010/03/09
4:06 UTC
Read the original article
Hit count: 540
Hi,
Running the following vbscript to call svnadmin dump fails (i.e. no dump is being created)
Set objShell = CreateObject("WScript.Shell")
Set objShellExec = objShell.Exec("svnadmin dump C:\svn_repos > C:\fullbackup")
I discovered from another post, http://stackoverflow.com/questions/445121/svn-dump-fails-with-wscript-shell/2400011#2400011 that i had to create a new command interpreter using cmd as follows:
Set objShellExec = objShell.Exec("%comspec% /c" & "svnadmin dump C:\svn_repos > C:\fullbackup")
This successfully created the dump but I could never read the output information (i.e. * Dumped revision 100. * Dumped revision 101. etc). I tried
Do While objWshScriptExec.Status = 0
Wscript.Echo objShellExec.StdOut.Readline
Wscript.Echo objShellExec.StdErr.Readline
WScript.Sleep 100
Loop
but nothing ever gets displayed.
May I know how i can read the output information and also why I needed to create a new command interpreter using "%comspec% /c" before the svnadmin dump command would execute correctly? Thanks.
Regards, Dexton
© Stack Overflow or respective owner