Skip to main content
Community Expert
June 9, 2026
Answered

Issue with getFiles method

  • June 9, 2026
  • 2 replies
  • 20 views

Hi All,

I am on macOS 26.5.1 and testing on InDesign 2025. I notice that getFiles function is behaving strangely. If I do something like the following, I get 0

Folder("/Users/manan/Documents").getFiles("").length

The same happens with other folders in this folder as well. Now, my script tries to use unPackageUCF and that too fails with these paths as input. I have noticed one thing, when the folders are created on the same day the code works fine. However, once the folders are older than a day the API starts failing. It does not make any sense to me. Any insights?

Correct answer Manan Joshi

Figured this out. This is due to “Full Disk Access” setting. This was not enabled for InDesign and hence this strange behaviour of the API

2 replies

Manan JoshiCommunity ExpertAuthorCorrect answer
Community Expert
June 10, 2026

Figured this out. This is due to “Full Disk Access” setting. This was not enabled for InDesign and hence this strange behaviour of the API

-Manan
Peter Kahrel
Community Expert
Community Expert
June 9, 2026

Makes no sense to me either.

All I can say is that getFiles(‘’).length works fine on Windows.

Community Expert
June 9, 2026

More strangeness. Since this script is a part of CEP extension I tried using cep.fs.deleteFile. This also fails for such files which were created a day ago inside the folder which is a child of Documents folder. The error is 6 which seems to say “File could not be written”.

Seems like a MAC thing now. I recently updated to macOS Tahoe

-Manan