get file sizes from a directory

If you need to get the file sizes from a certain directory you can use the Evaluate DAT to parse the output from the system command.

So first you need a script that echoes the directory structure to a Text DAT:

echo "`execute('system dir /A:-D /-C')`" >DAT:rawfiles

Notice how double and single quotes are being used to preserve the formating of the output.
Now with a Convert DAT and a Select DAT strip the list from all unnecessary information and use a Evaluate DAT and this expression in a Text DAT :

substr(trim(substr("$V",25,strlen("$V"))),0,index(trim(substr("$V",25,strlen("$V")))," "))

to only have the file size information left in the resulting table. I’m making use of the fact that there is a defined number of characters (25) taken up by the date and time that come as a result of the directory listing.

markus
Filesize.tox (14.2 KB)