

InterviewSolution
Saved Bookmarks
1. |
Solve : Want to delete history using bat? |
Answer» <html><body><p>Please help<br/><br/><br/>I am trying to create the bat that will delete all the following concern folders and files.<br/><br/>I want to delete my history on my user profile.<br/>And want to delete folders inside application data for <a href="https://interviewquestions.tuteehub.com/tag/local-537549" style="font-weight:bold;" target="_blank" title="Click to know more about LOCAL">LOCAL</a> settings.<br/>And outside local settings.<br/>I also want to delete temporary internet files using batch<br/><br/><br/> Code: <a>[Select]</a>del /f /q %temp%<br/>cd..<br/>cd application data<br/>rd /s /q mozilla<br/>cd..<br/>deltree application data<br/>cd termporary internet files<br/>del /f /q *.*<br/>cd..<br/>cd history<br/>del /f /q *.*<br/><br/>del /f /q userdata<br/><br/><br/><br/>Thanks and regards<br/>vishuthat is not a good idea a lot of programs will not work if you run that. Quote from: mat123 on August 10, 2010, 08:48:24 AM</p><blockquote>that is not a good idea a lot of programs will not work if you run that.<br/></blockquote> <br/>Why? Give details.<br/>deltree application data<br/>programs store info in that folder. the info is required to run Quote from: mat123 on August 10, 2010, 11:15:10 AM<blockquote>deltree application data<br/>programs store info in that folder. the info is required to run<br/></blockquote> <br/>Absolutely correct. Deleting that folder is a quick <a href="https://interviewquestions.tuteehub.com/tag/route-771422" style="font-weight:bold;" target="_blank" title="Click to know more about ROUTE">ROUTE</a> to a screwed up Windows system.<br/>the given program will not work on any Windows OS.<br/><br/>Deltree is not a command on Windows NT systems, and windows 9x (which has deltree) doesn't have an application data folder in the user's profile directory. Which isn't relevant anyway, because command.com by default starts in the desktop folder. (C:\Windows\Desktop). Secondly, because deltree's arguments aren't quoted, it won't delete an "Application Data" folder even if one existed, it would instead delete files named either "Application" or "data" or folders with that name. that and the cd command on 9x doesn't requires quotes to <a href="https://interviewquestions.tuteehub.com/tag/change-238106" style="font-weight:bold;" target="_blank" title="Click to know more about CHANGE">CHANGE</a> to any path with a space in it.<br/><br/>That <a href="https://interviewquestions.tuteehub.com/tag/combined-409631" style="font-weight:bold;" target="_blank" title="Click to know more about COMBINED">COMBINED</a> with the fact that even if there was some screwy OS configuration whereby that would work, it still wouldn't doo the steps claimed.I am <a href="https://interviewquestions.tuteehub.com/tag/thinking-771898" style="font-weight:bold;" target="_blank" title="Click to know more about THINKING">THINKING</a> if I could add exception to delete folder that is newly created after basic folder like microsoft, sun, adobe etc. Please let me know if I can manually add exception not to delete these folder. Rest I can.<br/><br/>Thanks and regards<br/>vish</body></html> | |