Data.Get.FileList
Top  Previous  Next


Fills the [Data] section with file details from a disk directory

Subdirectories are included

Use to perform operations depending on file details, example: move or delete all files of a certain type or size not accessed in a long time.

Category
Data section

Script section
[Init]

Data.Get.FileList Directory, ListOfProperties

Directory
Full disk path to directory  

ListOfProperties
List of properties and destination columns, Format: PropertyName§Column§[PropertyName§Column§].  
 
File property names  
Property name
Description
Name
File name
Extension
File extension
ShortName
Classic 8.3 "filename.ext" format
Directory
Directory, example c:\temp
Path
Full path, example c:\temp\data.bin
SubPath
Path below root directory. Use to copy or move a file to the same subdirectory at another location.

Example: if root directory for Data.Get.FileList is "c:\users" and path is "c:\users\steve\docs\bill.txt", then SubPath is "steve\docs\bill.txt".
Size
File size in bytes
Attr
File attributes
R = Read only  
H = Hidden  
S = System  
A = Archive flag  
C = Compressed  
Created
Creation time
Accessed
Last access time
Modified
Last write time
 

Example
Fill [Data] section with all possible properties for all files in "c:\temp"

[Settings_Begin]
BatchSettings.Delimiter=tab
BatchSettings.MarkerCol=12
[Settings_End]

[Init_Batch_Begin]
Data.Get.FileList c:\temp, Name§1§ Extension§2§ ShortName§3§ Directory§4§ Path§5§ SubPath§6§ Size§7§ Attr§8§ Created§9§ Accessed§10§ Modified§11§
[Init_Batch_End]

[Data_Begin]
[Data_End]

Full examples
·Delete files older than seven days  
·Move media files, big files and all files older than seven days