Solved

When running a batch file from a script "like Kaseya" how do I add a "Y" to continue.

Posted on 2014-11-23
2
163 Views
Last Modified: 2014-11-25
forfiles /p e:\ /s /d -14 /c "cmd /c del @path"

When running a batch file from a script "like Kaseya" how do I add a "Y" to continue.

e:\CacheSy (Full)\*, Are you sure (Y/N)? Y
e:\CacheSy(Full)\*, Are you sure (Y/N)? Y

here is my batch.

forfiles /p e:\ /s /d -14 /c "cmd /c del @path"
0
Comment
Question by:PAP0028
2 Comments
 
LVL 24

Accepted Solution

by:
VB ITS earned 500 total points
ID: 40460927
Add the /q switch at the end of the "del @path" command as this is the Quiet Mode switch, i.e. no prompts. Your command should then look like this:
forfiles /p e:\ /s /d -14 /c "cmd /c del @path /q"
0
 

Author Closing Comment

by:PAP0028
ID: 40465085
Thanks BIG help....
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

One of the features I've come to appreciate about Windows 7 and Windows Server 2008 R2 is the ability to pin applications to the task bar. As useful a feature as I've found this, it does have some quirks.  For example, have you ever tried pinning an…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
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…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now