Q: How to delete Folders based on the name of the folder.
The schema is:
username_YYMMDD-HHMMSS
is it possible to extract the date and use it as condition to check if it is older than x days and than delete the folder and all of its content?

A: Yes, this is possible using some Pascal Script.
- Source should be a Windows Folder or Share. We used the following folder as Source:

Or test content looks like:

- Pascal Script Setup

- Enable ‘On Rule Begin’ Pascal Script option and copy/paste the script from here: link- Do not forget the adjust the ctOlderThanDay Const value. We used 500 days.
- The Date format we used was YYMMDD
 

- File Filter Setup

- Directory Setup

- The %VSA (= Var String A) is used as directory filter. The previous Pascal Script will add the Subfolders to delete (older than x days) into this var.

- Function Setup

- RunTime Log Result:

- Source Content Result:

If you need any help with this ‘delete Folders based on the name’ request, please let us know.
Best Regards,
Limagito Team
#managedfiletransfer #filetransfer #filemanagement

