Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

need help with Batch file

Posted on 2011-03-10
3
255 Views
Last Modified: 2012-05-11
Need to have the batch file run without prompting for a "YES" or "NO"

C:\>del  \\test01\test\test

\\test01\test\test\*, Are you sure (Y/N)? y

Thanks
0
Comment
Question by:Sean
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
enzogoy earned 500 total points
ID: 35100301
Do you really need a batch file?  If not then you can run this command from the command prompt.  Work really well.

@DEL /S /Q /F "\\test\test\test\*.*"

The above command will delete all files in that test folder.  It won't pop up to ask you to confirm.
0
 
LVL 7

Assisted Solution

by:enzogoy
enzogoy earned 500 total points
ID: 35100446
@echo off
del /Q /S /F "\\testing\testing\testing\*.*"
exit

save it as a batch file ... will do the job too.
0
 
LVL 1

Author Closing Comment

by:Sean
ID: 35185826
Thank you.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

789 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