HELP ME DELETE FOR FORDER

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
hoangpuon1983
Posts: 6
Joined: 17 Jan 2018 23:24

HELP ME DELETE FOR FORDER

#1 Post by hoangpuon1983 » 08 Feb 2018 00:19

I have a foler backup. (vd: Forder is BACKUP)

Then in forder BACKUP will a lot of forder day

vd:
01 - 01 - 2018
02-01-2018
03-01-2018

How do i want del before 1 day after 1 day i working ?

I search on internet :

set deletepath="C:\Users\Administrator\Desktop\1"
set days=1
set extension=*

forfiles -p %deletepath% -s -m *.%extension% /D -%days% /C "cmd /c del /q @path"

But it del extension on folder . It not del folder after 1 day.


Help me !!! Thank everyone.

Post Reply