Unable to load data from file Reason:6h

User discussion and information resource forum for Image products.
Post Reply
ZebC
Posts: 9
Joined: Wed Dec 21, 2022 12:28 pm

Unable to load data from file Reason:6h

Post by ZebC »

Hello,

I'm using IFWRotate script, with additional switch /exlist=files.txt, where "files.txt" is an ansi text file with some paths (\Users\XXX\AppData\Local\Mozilla\Firefox\ >). But for some reasons, this generate error in the log:

[04/10/2023 04:00:02 PM] Unable to load data from file files.txt (Reason:6h)

What does that error mean?
TeraByte Support(PP)
Posts: 1646
Joined: Fri Aug 12, 2011 12:51 am

Re: Unable to load data from file Reason:6h

Post by TeraByte Support(PP) »

Are you using the full path to the file?
ZebC
Posts: 9
Joined: Wed Dec 21, 2022 12:28 pm

Re: Unable to load data from file Reason:6h

Post by ZebC »

Error is the same, even if I using a full path to the file:

Unable to load data from file c:\Users\xxx\Documents\kopia\files.txt (Reason:6h)

BUT, the correct path is "c:\Users\xxx\Documents\!!dziwne\!!kopia\files.txt".

After "escaped" the "!" things looks rather "unhealthy":

/exlist=c:\Users\xxx\Documents\^^^^^^^^^^!dziwne\^^^^^^^^^^!^^^^^^^^^^!kopia\files.txt

and:

Warning: Data excluded from files based on list in c:\Users\xxx\Documents\!dziwne\!!kopia\files.txt.

So now it work. But, is possible for IFWRotate script to deal with these special characters in more "elegant" or "safe" way? I don't now, so many escape characters, can breaks things somewhere in the IFWRotate script? Because the same situation is, when destination (TBIBase=) contains "!" character.

BTW: If documentation says somewhere what "reason 6h" means, would be easier for user to find a cause of error.
Last edited by ZebC on Wed Apr 12, 2023 9:49 am, edited 1 time in total.
TeraByte Support(PP)
Posts: 1646
Joined: Fri Aug 12, 2011 12:51 am

Re: Unable to load data from file Reason:6h

Post by TeraByte Support(PP) »

Assuming 6h is a standard Windows error, it's an invalid handle. IFW is not able to open and read the file.

I would recommend not using special characters in your paths and filenames. Handling them separately is not something the script can really do since they are (or may be) converted prior to the script even seeing them and some may be processed multiple times depending on where they are.

Can you use a simpler path for the file? For example: C:\ExcludeList\files.txt
ZebC
Posts: 9
Joined: Wed Dec 21, 2022 12:28 pm

Re: Unable to load data from file Reason:6h

Post by ZebC »

Sure, I can use a more "normal" directory names, it is just my habit from old Amiga days, where Amiga users just showoff what their filesystem can endure... But yeah, I understand the problem. For now, "escaping" works (ten "^" per one "!" for some reason), IFWRotate script works correctly, but clearly I must rethink some directory names. Thanks!
Post Reply