IfFileExists not working

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

IfFileExists not working

Post by Jerry Thomas » Wed Jul 17, 2013 7:09 pm

I can't get IfFileExists to work. Not sure what I am doing wrong...

Code: Select all

IfFileExists>"C:\Program Files (x86)\Macro Scheduler 14\msched.exe"
  MDL>64 bit OS
Else
  IfFileExists>"C:\Program Files\Macro Scheduler 14\msched.exe"
    MDL>32 bit OS
  Else
    MDL>Something is wrong
  Endif
Endif
Suggestions?
Thanks,
Jerry

[email protected]

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Jul 17, 2013 8:26 pm

Remove the quotes?

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1417
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Wed Jul 17, 2013 8:30 pm

Hi, this works. The quotes were the problem.

Code: Select all

IfFileExists>C:\Program Files (x86)\Macro Scheduler 14\msched.exe
  MDL>64 bit OS
Else
  IfFileExists>C:\Program Files\Macro Scheduler 14\msched.exe
    MDL>32 bit OS
  Else
    MDL>Something is wrong
  Endif
Endif

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1417
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Wed Jul 17, 2013 8:31 pm

Ooh, JRL beat me to it. :)

Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Post by Jerry Thomas » Wed Jul 17, 2013 10:10 pm



Thanks to both of you!

I have used it before with no problem but couldn't see what was right in front of me.
Thanks,
Jerry

[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts