Create your first automation in just a few minutes.Try Studio Web →
by YouTube
0
Snippet
<100
Summary
Summary
Auto delete files as per modified date from given path
Overview
Overview
This snippet is used to delete unwanted files from particular location/folder. It will take folder path as in-argument from where you want to delete the files. Along with that you need to provide date difference that is NoOfDays of the files you want to keep.
For example : I want to keep all files that are modified/updated in the last 2 days (yesterday and day before yesterday), so my NoOfDays will be -2.
• if you want to keep only today's modified file's then pass NoOfDays is 0
• if you want to keep today's as well as yesterday's modified files then pass NoOfDays is -1
• if you want to keep today's, yesterday's, as well as the day before yesterday's modified file's then pass NoOfDays is -2
Features
Features
You can simply invoke this snippet then pass arguments no. of days and folder path to delete all unwanted files before saving new files at a given location. No historical files will be left there consuming disk space. Your no. of days argument will help to decide until what days you want to keep your historic files based on the last modified date of each file.
Additional Information
Additional Information
Dependencies
No Dependency, only need to pass no. of days and folder path as in-arguments.
Code Language
Visual Basic
License & Privacy
MIT
Privacy Terms
Technical
Version
1.0.0Updated
February 18, 2020Works with
Tested on UiPath 2017.1.6435
Certification
Silver Certified
Support
UiPath Community Support
Resources