Page 1 of 1

Batch files

Posted: Wed Jan 30, 2008 6:27 am
by corpse
I have an old invoice program that has a back.bat file. It installed on a Windows 98 computer and when you click the backup.bat file, it backs up the program.

Just installed it on XP Home and when I click the backup.bat icon, there is a flash on the screen like it is trying to open, but nothing happens.

Any ideas?

Re: Batch files

Posted: Wed Jan 30, 2008 9:03 am
by Foo
right click -> edit

look at what it's trying to accomplish.

Also add 'pause' as the last line in the bat file and you can see what it's doing before it closes.

Re: Batch files

Posted: Wed Jan 30, 2008 8:32 pm
by corpse
@echo off
cls
lha a inv2bkup
copy *.lzh c:\invoice2\backup


Not having the program I realize this might not mean anything, but if it does, does it look right?

And, add the pause after c:\invoice2\backup......here?

Re: Batch files

Posted: Wed Jan 30, 2008 8:36 pm
by creep

Code: Select all

rem @echo off
cls
lha a inv2bkup
copy *.lzh c:\invoice2\backup
pause
Make it look like that, and then run it and see if there's an error message.
Note the addition of "rem" on the first line.

Or just open a command prompt, go to that directory, and type "backup"

Re: Batch files

Posted: Wed Jan 30, 2008 9:06 pm
by ^misantropia^
I bet you a sixpack you don't have `lha` installed.

Re: Batch files

Posted: Wed Jan 30, 2008 9:10 pm
by corpse
I have no clue what 'lha' is. Is it a file.

lzh is a zip[kind of ] file. I know that one.

Re: Batch files

Posted: Wed Jan 30, 2008 9:31 pm
by +JuggerNaut+
how can you install a .bat file but not know what 'lha' is.

Re: Batch files

Posted: Wed Jan 30, 2008 11:42 pm
by creep
Oh heh... I overlooked that. Just assumed lha was some part of the "invoice" program.

Looks like lha is some kind of ancient compression software. In that case, you can probably just do this

Code: Select all

@echo off
copy *.* c:\invoice2\backup
and achieve the same thing.

Re: Batch files

Posted: Wed Jan 30, 2008 11:54 pm
by corpse
+JuggerNaut+ wrote:how can you install a .bat file but not know what 'lha' is.

The .bat file just comes with the invoice program. I didn't make it. And yes it is ancient, dos based.

Re: Batch files

Posted: Thu Jan 31, 2008 12:21 am
by corpse
creep wrote:Oh heh... I overlooked that. Just assumed lha was some part of the "invoice" program.

Looks like lha is some kind of ancient compression software. In that case, you can probably just do this

Code: Select all

@echo off
copy *.* c:\invoice2\backup
and achieve the same thing.

Doesn't work. This is what is says,


BACKUP.BAT
The system cannot find the path specified
0 files copied
Press any key to continue


I put the pause in to look at it

Re: Batch files

Posted: Thu Jan 31, 2008 2:24 am
by creep
Does c:\invoice2\backup exist?

Re: Batch files

Posted: Thu Jan 31, 2008 3:07 am
by corpse
There is a folder called Invoices2.........sorry. My fault. The folder is called Invoices2, not Invoice2......notice the 's'.

It works, thank you very much

Re: Batch files

Posted: Thu Jan 31, 2008 8:34 am
by Foo
So it's fixed?