FORFILES Syntax Help needed

Posted on 2008-02-12
Medium Priority
Last Modified: 2010-04-21

I am using the following forfiles command as a scheduled task to remove all files over 7 days old from a directory structure on my server. However i am unable to find a way to suppress the delete confirmation dialogue when the command runs.

Command is - FORFILES -p D:\Public -s -m *.* -d -7 -c "CMD /C del @FILE"

could anyone please adivse on how to modify the above command so it suppresses the delete confirmation?
Question by:rhsadmin

Accepted Solution

devil_himself earned 2000 total points
ID: 20873915

FORFILES -pD:\Public -s -m*.* -d-7 -c"CMD /C del /q @FILE"

Author Closing Comment

ID: 31430112
thankyou very much - works great :)

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

AutoHotkey is an excellent, free, open source programming/scripting language for Windows. It started out as a keyboard/mouse macros product, but has expanded into a robust language. This article provides an introduction to it, with links to addition…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

587 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question