How to delete Temp file and Prefetch files via Batch command without deleting, and creating again Temp folder,?
-
i,m trying to clean temp files/ prefetch files withe Batch command, without compliantly deleting and creating again this folders. In other words go to folder select everything in it, and delete also try not to get error "can't continue this files are used by another program this is what i have so far %SystemRoot%\explorer.exe %temp%\ pause del %temp%\*.* pause %SystemRoot%\explorer.exe C:\Windows\prefetch\ pause del C:\Windows\prefetch\*.* pause it works, but it dos't delete some of the files, and leaves all of the folders intact in the %temp% folder. you also have to choose Yes or No Y/N to conferm the delete. this kind of defeats purpose of Batch file commands so i tryed adding this to delete command ↓ ECHO Y | del %temp%\*.* like it was suggested by this website http://www.robvanderwoude.com/del.php but it crashes immediately after seeing the line please help me figure this out. I thing this will be useful . and Sorry for broken English
-
Answer:
del %temp%\*.* /s /q the /s means to delete files in all of %temp%'s subdirectories also the /q means "quiet" or in other words: it won't prompt "are you sure? blah blah. . ." There is no want to forcefully delete a file that is being used by the processes - it must be important. You can use >nul at the end of your del command to make it not display anything too.
kademi at Yahoo! Answers Visit the source
Related Q & A:
- How to create jar file from command line?Best solution by Stack Overflow
- How can I delete my Yahoo Group without deleting my Yahoo account?Best solution by Yahoo! Answers
- How to transfer files via Ad Hoc connection?Best solution by Super User
- Is there any way to delete my youtube account without deleting my google account?Best solution by productforums.google.com
- How do you get a quick,new email via MSN without deleting original email?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.