Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
DOS/Other
Tag Cloud
access acer asus bios bsod computer crash desktop dns driver drivers error ethernet excel freeze gaming graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard network printer problem ram registry repair router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > DOS/Other >
how to delete files and folders if they are 10 days old

Reply  
Thread Tools
narutrix's Avatar
Junior Member with 6 posts.
 
Join Date: Feb 2010
07-Feb-2010, 07:47 AM #1
how to delete files and folders if they are 10 days old
Hi Guys,

I'm maintaining a folder in our sever whose content ( of files and folders ) needs to be automatically deleted after 10 days.

Is there a batch file I can use? Our server is using Windows 2003.

So far, this is only what I have:


forfiles /p D:\test\ /s /m *.* /d -10 /c "cmd /c del echo @FILE"



but I think it only deletes files, not folders.
I'm scanning another thread "Deleting Folders older than 30 days from date" but I can't a single info in my head
Hope you can assist me.
Ent's Avatar
Ent Ent is offline Ent is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 3,237 posts.
 
Join Date: Apr 2009
Location: United Kingdom
Experience: Intermediate
07-Feb-2010, 08:51 AM #2
I've reported your thread, so hopefully it will be moved to the Windows server forum where it belongs. You should get far more fitting help there.
Elvandil's Avatar
Computer Specs
Moderator with 48,924 posts.
 
Join Date: Aug 2003
Location: Vermont
Experience: "Been through the mill."
07-Feb-2010, 09:22 AM #3
Please do not double-post. Please read the rules, especially the section entitled "Multiple Postings".

http://forums.techguy.org/all-other-...olders-if.html
Reply

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:48 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.