Batch files

Locked
corpse
Posts: 678
Joined: Sun Jan 12, 2003 8:00 am

Batch files

Post 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?
User avatar
Foo
Posts: 13840
Joined: Thu Aug 03, 2000 7:00 am
Location: New Zealand

Re: Batch files

Post 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.
corpse
Posts: 678
Joined: Sun Jan 12, 2003 8:00 am

Re: Batch files

Post 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?
creep
Posts: 1007
Joined: Tue Dec 30, 2003 8:00 am

Re: Batch files

Post 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"
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Batch files

Post by ^misantropia^ »

I bet you a sixpack you don't have `lha` installed.
corpse
Posts: 678
Joined: Sun Jan 12, 2003 8:00 am

Re: Batch files

Post by corpse »

I have no clue what 'lha' is. Is it a file.

lzh is a zip[kind of ] file. I know that one.
+JuggerNaut+
Posts: 22175
Joined: Sun Oct 14, 2001 7:00 am

Re: Batch files

Post by +JuggerNaut+ »

how can you install a .bat file but not know what 'lha' is.
creep
Posts: 1007
Joined: Tue Dec 30, 2003 8:00 am

Re: Batch files

Post 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.
corpse
Posts: 678
Joined: Sun Jan 12, 2003 8:00 am

Re: Batch files

Post 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.
corpse
Posts: 678
Joined: Sun Jan 12, 2003 8:00 am

Re: Batch files

Post 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
creep
Posts: 1007
Joined: Tue Dec 30, 2003 8:00 am

Re: Batch files

Post by creep »

Does c:\invoice2\backup exist?
corpse
Posts: 678
Joined: Sun Jan 12, 2003 8:00 am

Re: Batch files

Post 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
User avatar
Foo
Posts: 13840
Joined: Thu Aug 03, 2000 7:00 am
Location: New Zealand

Re: Batch files

Post by Foo »

So it's fixed?
Locked