GFL_TYPE not always default =0

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 1021
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

GFL_TYPE not always default =0

Post by Grovkillen » Wed Apr 26, 2023 7:07 am

I have discovered that it's not a good approach to assume that GFL_TYPE=0 as stated in the online manual. After deploying a "file finder and opener" script to my collogues I got feedback from 3-4 (of a total of 17) that the app didn't find any files. I did some head scratching and found out that if I hardcoded GFL_TYPE=0 those users didn't have this problem anymore.

I would suggest that the online manual got updated with this information.
Let>ME=%Script%

Running: 15.0.24
version history

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

Re: GFL_TYPE not always default =0

Post by Dorian (MJT support) » Wed Apr 26, 2023 8:16 am

Strange. We've never had any reports of this nature before.

While it doesn't specifically state the default is 0, I'd say it would certainly be implied (this could my ASD though) :

By default GetFileList returns files. To return directories only set GFL_TYPE to 1 (Let>GFL_TYPE=1).

It does mention sort type default being 0 though.
Yes, we have a Custom Scripting Service. Message me or go here

User avatar
Grovkillen
Automation Wizard
Posts: 1021
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: GFL_TYPE not always default =0

Post by Grovkillen » Wed Apr 26, 2023 10:19 am

Yeah you're right, but this problem was resolved by setting it to zero. Just thought I'd add this information to the community.
Let>ME=%Script%

Running: 15.0.24
version history

User avatar
Grovkillen
Automation Wizard
Posts: 1021
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: GFL_TYPE not always default =0

Post by Grovkillen » Wed Apr 26, 2023 10:21 am

The behavior only affected network paths and not local paths. As a hint where to digg deeper.
Let>ME=%Script%

Running: 15.0.24
version history

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

Re: GFL_TYPE not always default =0

Post by Dorian (MJT support) » Wed Apr 26, 2023 10:47 am

Ah, that's good to know. Thank you.
Yes, we have a Custom Scripting Service. Message me or go here

User avatar
Grovkillen
Automation Wizard
Posts: 1021
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: GFL_TYPE not always default =0

Post by Grovkillen » Wed Apr 26, 2023 1:44 pm

Maybe, just maybe, the problem was caused by a delay in listing the network path because I added a little delay and that fixed the problem too.... 🤷
Let>ME=%Script%

Running: 15.0.24
version history

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