Completed

A Windows batch script to delete backup files from a folder

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"

Skills: DOS, Powershell

See more: linux example script delete owner files, script search xml files folder string, windows batch script call scheduled task, cgi script delete selected files, windows batch script line break, php script delete selected files server, windows batch script, script count excel files folder, windows batch script moving files, windows batch script basics, script delete temp files local profiles remote, linux script delete temp files, perl script count lines files folder, windows batch script linebreak, windows batch script delete oldest file, batch script to rename files in a folder, batch script to zip files in windows

About the Employer:
( 15 reviews ) Budapest, Hungary

Project ID: #23979777

Awarded to:

dsengar121

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.

€25 EUR in 1 day
(30 Reviews)
4.7

7 freelancers are bidding on average €32 for this job

goodwork20k

I am good in bat and powershell script along with automation and development, please let me know if you are good to award this project to me

€30 EUR in 3 days
(30 Reviews)
5.2
kashifnadeem86

Hi, I'll write a batch or powershell script to complete your task mentioned in the project description. Best,

€50 EUR in 1 day
(3 Reviews)
3.5
pogodin

Hello ! I can do this in vbscript procedure (vbs files run the same way as bat files). Thank You. Regards, Alexei.

€20 EUR in 4 days
(1 Review)
1.4
Ldelcampo23

Hi, I can help you with your script. Let chat with me if you need more information about my experience. The request is clear. Regards

€35 EUR in 3 days
(0 Reviews)
0.0
ratlangaytho

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.

€34 EUR in 1 day
(0 Reviews)
0.0
Jjadmon2020

Hello, talented software engineer over here. Just tell what you need and will help you get the job done.

€28 EUR in 1 day
(0 Reviews)
0.0