Combining IfFileExists with an IF

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Shadow3641
Junior Coder
Posts: 26
Joined: Thu Nov 17, 2016 2:45 pm

Combining IfFileExists with an IF

Post by Shadow3641 » Fri Jan 20, 2017 2:59 pm

Is there a way to put a IfFileExists and a If statement together with an Or

Code: Select all

 
IfFileExists>DirC1 ( Need to add a "OR IF>Correlat=1" )
   GoTo>MoveFile
Else
   GoTo>CompareFile
Endif

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Combining IfFileExists with an IF

Post by Marcus Tettmar » Fri Jan 20, 2017 3:06 pm

You could do something like this:

Code: Select all

Let>myFileExists=0
IfFileExists>DirC1
  Let>myFileExists=1
Endif

If>{(%myFileExists%=1) OR (%Correlat%=1)}
   GoTo>MoveFile
Else
   GoTo>CompareFile
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Shadow3641
Junior Coder
Posts: 26
Joined: Thu Nov 17, 2016 2:45 pm

Re: Combining IfFileExists with an IF

Post by Shadow3641 » Fri Jan 20, 2017 3:09 pm

Awesome!! Thanks for the help

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