PDA

View Full Version : Urgent help required - batch or script needed (WinXP)


Darat
21st June 2006, 06:12 AM
I've been using a utility called Handy Backup to backup my documents for over a year now and it has always seemed to work fine.

However (long story) I now need it to restore a couple of thousand files and guess what? Yep something has screwed up.

After a very,very slow response from the software makers - Novosoft LLC - they have provided me with a utility I can run from the command line that allows me to restore a single file BUT as I said I have thousands of the things.

Could anyone help me out creating a batch file or some form of script I can use to automate this?

The command line for the utility is:

hbagent.exe -Decrypt file.in file.out passwd

Ideally what I need to be able to do is run it in one of the back-up directory so it will find every file ending with .bf (which should be all of them in that folder) and unencrypts it e.g.

hbagent.exe -Decrypt testfile.doc.zip.bf testfile.doc.zip passwd

Any help anyone?

(In case it matters the file names are not 8.3 format, they can be any length and may contain spaces in the name.)

Oh and I don't recommend this product!!

Banbury
21st June 2006, 06:27 AM
Try AutoIt (http://www.autoitscript.com/autoit3/). It's an easy to use BASIC like scripting language.

Zax63
21st June 2006, 07:37 AM
Are you using some form of Windows?
I thought the problem was interesting so I wrote a quick & dirty script generator using Visual Basic that should get the job done.
Let me know if you are interested.

Darat
21st June 2006, 07:43 AM
Yep I am using windows - and I will shower you with praise from now until eternity if you've got a utility that can do this for me!

Zax63
21st June 2006, 07:59 AM
Can you send me a private message with your address and I will e-mail it to you. Its a little over 1MB.

Darat
21st June 2006, 08:00 AM
Please send it to darat@randi.org

Thank you.

Zax63
21st June 2006, 08:29 AM
(In case it matters the file names are not 8.3 format, they can be any length and may contain spaces in the name.)


I forgot to account for this in my program. It should work if you put quotes around the [IN] and [OUT] in the command box.

So before clicking on the button change the command to:
hbagent.exe -Decrypt "[IN]" "[OUT]" [PASSWORD]

epepke
21st June 2006, 09:03 AM
If you have Perl, and of course you always should, something like this should work:

opendir (CURRENT, '.');
@files = readdir(CURRENT);
closedir CURRENT;

foreach $file (@files)
{
if ($file =~ /.bf$/)
{
$bare = $`;
system "hbagent -Decrypt $file $bare passwd";
}
}

kevin
21st June 2006, 09:55 AM
create a batch file with:

for %%f in (%1) do "hbagent.exe" -Decrypt "%%f" "%%~nf" passwd

run the batch file with:
batch.cmd *.bf

It will process all files ending in bf. For testing you could do 1 file (full name) or *.zip.bf for all zip files.

Paul C. Anagnostopoulos
21st June 2006, 10:42 AM
Uh, can't you plug in a backup image so it appears as a drive?

~~ Paul

kevin
21st June 2006, 10:44 AM
i don't think he has an image, it sounds like the files get individually backed up and encrypted.

Paul C. Anagnostopoulos
21st June 2006, 10:56 AM
Ouch.

~~ Paul

Darat
21st June 2006, 11:08 AM
Yep that is how it works - I've been using it for a while and done partial restores before (from the same back-up set) but this time something has gone screwy and I'm left with a whole load of individual files that have been compressed and then encrypted.

And their tech support has been terrible.

BPSCG
22nd June 2006, 05:03 AM
And their tech support has been terrible.If it were all so simple! If only there were evil people somewhere insidiously committing evil deeds, and it were necessary only to separate them from the rest of us and destroy them.

Do you think this company's tech support people qualify?

Darat
22nd June 2006, 05:28 AM
If it were all so simple! If only there were evil people somewhere insidiously committing evil deeds, and it were necessary only to separate them from the rest of us and destroy them.

Do you think this company's tech support people qualify?

Obviously Solzhenitsyn had never had an encounter with the:

Chief Support Manager
Novosoft LLC

a_unique_person
22nd June 2006, 05:28 AM
The basic version is now on special, marked down from $30 to only $5.

Paul C. Anagnostopoulos
22nd June 2006, 05:39 AM
Time for a new backup app, Darat. I recommend Acronis TrueImage.

~~ Paul

Zax63
22nd June 2006, 09:49 AM
Time for a new backup app, Darat. I recommend Acronis TrueImage.

~~ Paul

Have you ever had to restore from a drive image in TrueImage? I was researching it a few weeks ago and I found some people complaining that their drive image was corrupted when they went to use it even if they had verified the data. Also several reports about problems backing up to a USB drive.


Another good program is Cobian backup which has the advantage of being free.