Folder size analysis failing with IllegalFileName error

(imported topic written by SystemAdmin)

Using the following to get the size of a folder

sum of ((sum of sizes of descendants of it) /1024/1024)of folder(“c:\test”)

The error “The expression could not be evaluated: class IllegalFileName” occurs when theres a file with an illegal character found and the size of the folder is not returned.

Does anyone know a way around this? Is there a way to execute a simple dos command to get the size of the folder (which works) and have BF return it to the results column?

Thank you for any assistance.

(imported comment written by SystemAdmin)

You pretty much summed up what you want to do yourself:

  1. Save the output from your dos command to get the size of the folder into a file.

  2. Write the relevance to check if the file exists, and if so, extract the information you want from the file.

I’d generally do step 1 as part of a single action that does a variety of daily (hourly?) checks and saves the output in a series of files. This allows you to write a number of relevance queries that can take this data any time they want without putting additional load on the client.

-Jim