How to remove old files from directory (Selected by date)
Options

Luxrobotic
✭✭
Hello evreybody,
I'd like to remove the fold files (Older than 1 year) I created with the following code :

VAR string stFilePath:="Home:/BackupLogs/";
VAR string stFileName;
VAR iodev logfile;
VAR string stFileName;
VAR iodev logfile;
VAR string stPart;
stFileName:=stFilePath+stDate+"_MyFile.csv";
Open stFileName, logfile\Append;
Write logfile,stTimeLogs;
Close logfile;
Write logfile,stTimeLogs;
Close logfile;
How could I filter and remove the files containing the stPart in the name ?
stPart := StrPart(stDate,1,4);
RemoveFile(stFilePath+"/"+FileName);
Regards
http://www.luxrobotic.com
Cornet Raymond
Manager
+352 621 354 570
raymond.cornet@luxrobotic.com
http://www.luxrobotic.com
HP ZBook Fury 16 G11
0
Categories
- All Categories
- 5.6K RobotStudio
- 400 UpFeed
- 20 Tutorials
- 14 RobotApps
- 301 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 348 IRC5
- 74 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 847 RAPID Programming
- 21 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 109 Collaborative Robots
- 5 Job listings