Sign in to follow this  
Followers 0
1bobby

Wrong directory

4 posts in this topic

The following command causes the following error. All I am trying to do is run ntbackup of two directors of gasboy and fm2000.

I tried the comspec option and still get the same thing. Why wont it go to the correct location, or what am I doing wrong?

RunWait("c:\windows\system32\ntbackup backup c:\FM2000, 'c:\program files\gasboy\'", @SW_MAXIMIZE)

RETURNS the following error

Running:(3.2.4.9):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\bobbyb\Desktop\DPSI Backup.au3"

C:\Documents and Settings\bobbyb\Desktop\DPSI Backup.au3 (68) : ==> Unable to execute the external program.:

RunWait("ntbackup backup c:\FM2000, 'c:\program files\gasboy\'", @SW_MAXIMIZE)

note: if you want the whole code to help me, please let me know.

thanks bobby

Share this post


Link to post
Share on other sites



That RunWait is totally messed up. What folder are yoy trying to backup? Probably c:\FM2000. Or are you trying to backup both c:\FM2000 and c:\program files\gasboy\ ?


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

That RunWait is totally messed up. What folder are yoy trying to backup? Probably c:\FM2000. Or are you trying to backup both c:\FM2000 and c:\program files\gasboy\ ?

Yes, I am trying to backup FM2000 and Gasboy.

Share this post


Link to post
Share on other sites

First I'm not sure if you can specify 2 folders at the same time with Ntbackup. See here

Ntbackup examples

Also. If you can indeed do it then the RunWait would be

RunWait('ntbackup backup c:\fm2000 "c:\program files\Gasboy"', @SW_Maximize)

I just switched your single and double quotes

A better way might be to use

$fList = StringSplit('C:\fm2000|"C:\Program Files\Gasboy"','|')

For $I = 1 To $fList[0]
   RunWait ('ntbackup backup ' & $flist[$I], @SW_MAXIMIZE)
Next

Better yet is

$flist = StringSplit("c:\fm2000|" & @ProgramFilesDir & "\Gasboy", "|")
For $I = 1 To $fList[0]
If FileExists($Flist[$I] Then RunWait("ntbackup backup " & FileGetShortName($Flist[0]), @SW_Maximize)
Next

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0