Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Computing > Alt Msdos Batch > Strange failure...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 9 Topic 2740 of 2785
Post > Topic >>

Strange failure in batch file.

by Poster Matt <postermatt@[EMAIL PROTECTED] > Jul 4, 2008 at 03:58 PM

Hi,

Using WinXP SP2 (up to date).

I've been writing the occasional batch file for Microsoft OSes since 
about 1990 and never had a problem like this.

I have a batch file that archives various directories for backup 
purposes. Until recently I've used a command line PKZip program 
(PKZip25), but now I want the added flexibility of RAR archives so am 
switching to that.

My 'DailyBackup.bat' file has been converted to use the command line 
utility that comes with WinRAR, called appropriately 'rar.exe'.

The following single line from my bat file (below split onto 2 lines to 
avoid word wrap problems) is typical of the command lines in the bat file.

"C:\Program Files\WinRAR\rar" a -rr5% -m5 -o+ -ep2 -r
"D:\BackUp\DailyRAR\notes.rar" "D:\Text\Notes\*.*"

Now that line works perfectly and as expected when run directly from the 
Win 'Command Prompt'. But as soon as I put it in a .bat file all I get 
is the 'rar.exe' utility's standard usage help text output (the one that 
shows how to format a line and the commands and switches list) as if I'd 
typed 'rar -?'.

I've tried tests with various single line commands from the prompt and 
then putting the exact same line in a .bat file and get the same result 
each time; fine on the command line, failure in a .bat file.

I'm perplexed as to why this is happening in the batch files having 
never run into such a situation before.

Any advise as to why this is happening and resolving it would be 
appreciated.

Many thanks.

PS. Anyone know of an alternative free command line RAR achiver utility 
for Win XP.
 




 9 Posts in Topic:
Strange failure in batch file.
Poster Matt <postermat  2008-07-04 15:58:31 
Re: Strange failure in batch file.
"billious" <  2008-07-05 00:21:00 
Re: Strange failure in batch file.
Poster Matt <postermat  2008-07-04 16:34:05 
Re: Strange failure in batch file.
Timo Salmi <ts@[EMAIL   2008-07-04 20:16:14 
Re: Strange failure in batch file.
ShadowTek <psistormyam  2008-07-04 18:11:08 
Re: Strange failure in batch file.
ShadowTek <psistormyam  2008-07-04 19:14:51 
Re: Strange failure in batch file.
Poster Matt <postermat  2008-07-05 12:48:14 
Re: Strange failure in batch file.
ShadowTek <psistormyam  2008-07-06 03:19:38 
Re: Strange failure in batch file.
Poster Matt <postermat  2008-07-09 12:58:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 8:39:49 CDT 2008.