batch file won't run normally

Chitchat about x² / 2X products

Moderators: fgagnon, nikos, Site Mods

mrainey
New Member
Posts: 7
Joined: 2004 Oct 03, 00:00
Location: Kings Mountain, North Carolina

batch file won't run normally

Post by mrainey »

Hi,

Registered the Pro version a few weeks ago, just love it!

Having a problem running the following batch file. It works fine in Windows Explorer, but in xplorer2 the DOS console window appears normally and goes away normally, but the files are not erased.

I checked the registry keys you described in another thread. They show the correct values for batch files.

Running XP Home.

The file:

erase *.o
erase *.a
erase *.opts
erase *.map
erase *.fil
erase *.opti
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

The batch file may not be operating on the folder/directory you think it is.

Use:
CD <pathspec>
in the .bat file to change to the directory where the files you want to operate on exist; then, erase away ...
mrainey
New Member
Posts: 7
Joined: 2004 Oct 03, 00:00
Location: Kings Mountain, North Carolina

Post by mrainey »

Thanks, but adding the cd \path line didn't help.

That batch file has worked for months on three different computers, when double-clicked inside Windows Explorer.

Not a big deal right now, but I would like to figure out if there's a workaround.
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

I cannot reproduce your problem (on XP sp2).
I placed a .bat file containing the following code in the directory where I wanted to delete all .bak files, as a test.

Code: Select all

erase *.bak 
When I d-clicked the bat file in a xplorer² pane, it erased all .bak files as expected.
I also placed this .bat file elsewhere [ in c:\utils ], and ran it.

Code: Select all

cd \fg\analysis
erase *.bak 
Again, this worked as expected, deleting all .bak files in the target directory.
mrainey
New Member
Posts: 7
Joined: 2004 Oct 03, 00:00
Location: Kings Mountain, North Carolina

Post by mrainey »

I appreciate your making the effort, and will operate on the premise that the problem is related somehow to my machine configuration. As I said, it's a minor problem for me right now.