Batch file command

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Why doesn't the following batch file command work in XP?
if (%1%) == () dir a:

When the following command does work:

if (%1%) == () dir

Fred
 
Why doesn't the following batch file command work in XP?
if (%1%) == () dir a:

When the following command does work:

if (%1%) == () dir

Fred
Hi

Are you sure you don't mean this:

if (%1) == () dir a:


and
if (%1) == () dir
 
Thank you very much. Getting rid of that extra %
worked. I always used it before, but it didn't work on
XP in that one case. It seems strange that

if (%1%) == () dir

did work.

Thanks again,
Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top