I need a Windows batch script which goes through the content of one folder and removes all files which meet all the following criteria:
- the file name is in the following format: [login to view URL] (where YYYYMMDD denotes a date)
- the file is older than 15 days (the file creation or modification date can be taken or also the YYYYMMDD part of the file name can be used)
- DD is not "01" in the filename (so basically files having a name of [login to view URL] should not be deleted).
Originally I had the following operation but this one does not support the last requirement. So this line needs to be rewritten.
forfiles /p "C:\DB Backup\SCM-TEST" /m SCM-TEST????????.bak /D -15 /C "cmd /c del @path"
Hi I can create a powershell script to accomplish this backup file deletion task. Will include the exception for SCM-TEST??????[login to view URL] files too.
Bu iş için 7 freelancer ortalamada €32 teklif veriyor
Hi, I'll write a batch or powershell script to complete your task mentioned in the project description. Best,
Hi, I’m devops engineer and strong in powershell scripting. I can write a new script for you to do the job easily Chat to me so we can make thing clearer Thank you.
Hello, talented software engineer over here. Just tell what you need and will help you get the job done.