Check for Files That are Zero Bytes

Loop through a folder and check for any files that are zero bytes or empty

This task will loop through a folder and check for any files that are zero bytes or empty using the function FileLen() to get the size of the file. An IF conditional is used to evaluate whether it is less than 1 byte in size. If the file is 0 bytes a message dialog will be displayed that the file is zero bytes in size.

FileLen() Returns the length of a file in bytes. If the specified file is open when the FileLen function is called, the value returned represents the size of the file immediately before it was opened. The FileLen() function can be found in the Automate 6 Expression Builder. Help on the function can be found in the Help Doc at Automate -> Reference -> Basic Scripting -> Functions.

Note: For the task to work properly, please create a folder named Temp in the root of your C:\ directory or modify the Loop Files action to point to a specific folder.

Task Category:

Looping