More IfFileChanged Fun

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
tony_smith
Pro Scripter
Posts: 70
Joined: Wed May 14, 2003 8:25 pm
Location: Vancouver BC Canada

More IfFileChanged Fun

Post by tony_smith » Fri Nov 26, 2004 6:06 pm

My existing scripts containing IFC stopped working when I upgraded to Version 7.3...

This is undocumented, but the IFC statement in version 7.3 must have at least a comma denoting that the false label name is null or it will no longer work correctly.

For instance... this old code will yield erroneous output;

GetFileList>U:\Reports\EDIF_BATCH\*.txt,files
Separate>files,;,file_names
MessageModal>Num Files: %file_names_count%
Let>k=0
Repeat>k
Let>k=k+1
IfFileChanged>file_names_%k%,NOPE
Label>YUP
Let>FYUP=file_names_%k%
Messagemodal>Yes-More than 1%CRLF%%FYUP%
Goto>SKIPNO
Label>NOPE
Let>FNOPE=file_names_%k%
Messagemodal>No-Less than 1%CRLF%%FNOPE%
Label>SKIPNO
Until>k,file_names_count

If I change the line containing the IFC to;

IfFileChanged>file_names_%k%,U:\Reports\EDIF_BATCH\*.txt,files
Separate>files,;,file_names
MessageModal>Num Files: %file_names_count%
Let>k=0
Repeat>k
Let>k=k+1
IfFileChanged>file_names_%k%,YUP
Let>FYUP=file_names_%k%
Messagemodal>Yes-More than 1%CRLF%%FYUP%
Goto>SKIPNO
Label>NOPE
Let>FNOPE=file_names_%k%
Messagemodal>No-Less than 1%CRLF%%FNOPE%
Label>SKIPNO
Until>k,file_names_count

Hope this saves some of you some time.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Sat Nov 27, 2004 12:22 am

That's not good, it should be backward compatible. Thanks for letting us know. We will fix this immediately and issue an update asap.
MJT Net Support
[email protected]

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