Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Check for document name 1 in %1  (Read 2620 times)

0 Members and 1 Guest are viewing this topic.

rilokiley80

  • Guest
Check for document name 1 in %1
« on: August 27, 2007, 06:33:10 AM »
Hi!

I have a file that stores a document name in %1. How do I compare what is stored in %1 to a specific document name?

I want to check if the document name stored in %1 is "document name nr 1", and if it is I will do one thing, but if it's not I will do something else.

Sorry, but I'm not good at this at all.  :-[

Thanks,
Karen

contrex

  • Guest
Re: Check for document name 1 in %1
« Reply #1 on: August 27, 2007, 07:28:31 AM »
Use IF with quotes and double equals signs, and goto a label.

Quote
IF "%1"=="document name nr 1" goto same

goto notsame

:same

...commands to execute if %1 is document name nr 1

goto next

:notsame

...commands to execute if %1 is NOT document name nr 1

:next



rilokiley80

  • Guest
Re: Check for document name 1 in %1
« Reply #2 on: August 29, 2007, 12:46:01 AM »
Thank you! I will try that right away.

/Karen