Author Topic: InfoEdit Batch tool DB only option  (Read 4853 times)

0 Members and 1 Guest are viewing this topic.

Padanges

  • Newbie
  • *
  • Posts: 179
InfoEdit Batch tool DB only option
« on: August 29, 2016, 08:16:02 AM »
Hi,
using a custom script for geting file address length (BatchFile.Filename.length;) we can get the result in Expression composer even for directories which are longer than 259 characters. But after running the script the batch tool I/O log returns message "file not found" (while the DIskTree tool indexes this file and shows it in the Grid) and does not update the values for the file name entries which are longer than 259 even though you choose an option "DB only". It seems like a bug because if I can get the results in the Expression Composer using [FP]+[F], and choose an option "DB only" - I don't need to access the file and there should be no problems for getting the values updated.


Regards

P.S. there's an article which shows how to access files which have "long address": https://msdn.microsoft.com/en-us/library/aa365247.aspx#win32_file_namespaces

Padanges

  • Newbie
  • *
  • Posts: 179
Re: InfoEdit Batch tool DB only option
« Reply #1 on: August 31, 2016, 11:57:30 AM »
Any ideas on how to change DB (Only) values for the files which have "long" address name?

RTT

  • Administrator
  • *****
  • Posts: 907
Re: InfoEdit Batch tool DB only option
« Reply #2 on: August 31, 2016, 05:12:33 PM »
I think I have this fixed now. Thanks for pointing out the issue.
The code was checking for the existence of the file (and the code was limited by that MAX_PATH limit), even if only to update the DB. In addition to that fix, I'm also adding support for longer than MAX_PATH to related routines. I was aware of this problem but I never got a complain about it, so the fix got postponed.

And it's nice to know that Windows 10 version 1607 has a nice opt-in workaround for apps that already use the Unicode versions of some of these WinAPI file management functions. Thanks for linking that article.