Can I place this in the XP autoexec.bat

Discussion in 'Software' started by Stack, Oct 21, 2008.

  1. Stack

    Stack Private E-2

    @deltree/y C:\Documents and Settings\Dan\Local Settings\Temporary Internet Files\*.*
    @deltree/y C:\Documents and Settings\Administrator\Cookies\*.*
    @deltree/y C:\Documents and Settings\Dan\Cookies\*.*
    @deltree/y C:\Documents and Settings\Dan\PrivacIE\*.*
    @deltree/y C:\Documents and Settings\Default User\Cookies\*.*
    @deltree/y C:\Documents and Settings\LocalService\Cookies\*.*
    @deltree/y C:\Documents and Settings\Administrator\Local Settings/HistoryHistory.IE5\*.*
    @deltree/y C:\Documents and Settings\Administrator\Local Settings/Temporary Internet Files\Content.IE5\*.*
    @deltree/y C:\Documents and Settings\Default User\Local Settings\History\History.IE5\*.*
    @deltree/y C:\Documents and Settings\Default User\Local Settings\Temporary Internet Files\Content.IE5\*.*
    @deltree/y C:\Documents and Settings\LocalService\Local Settings\History\History.IE5\*.*
    @deltree/y C:\Documents and Settings\LocalService\Local Settings\Temporary Internet Files\Content.IE5\*.*
    @deltree/y C:\Documents and Settings\Dan\Application Data\Microsoft\Internet Explorer\UserData\*.*
    @deltree/y C:\Documents and Settings\Dan\Local Settings\Application Data\Microsoft\Feeds Cache\*.*
    @deltree/y C:\Documents and Settings\Dan\Application Data\ArcSoft\PhotoImpression\Cache\1.0.0.21\*.*
    @deltree/y C:\Windows\pchealth\helpctr\OfflineCache\*.*
    @deltree/y C:\Windows\System32\config\systemprofile\Cookies\*.*
    @deltree/y C:\Windows\system32\config\systemprofile\Local Settings\History\History.IE5\*.*
    @deltree/y C:\Windows\system32\config\systemprofile\Local Settings\Temporary Internet Files\Content.IE5\*.*
    @deltree/y C:\Documents and Setttings\Dan\Recent\*.*



    @deltree/y C:\Documents and Settings\Dan\Local Settings\Temporary Internet Files\indeX.dat
    @deltree/y C:\Documents and Settings\Administrator\Cookies\indeX.dat
    @deltree/y C:\Documents and Settings\Dan\Cookies\indeX.dat
    @deltree/y C:\Documents and Settings\Dan\PrivacIE\indeX.dat
    @deltree/y C:\Documents and Settings\Default User\Cookies\indeX.dat
    @deltree/y C:\Documents and Settings\LocalService\Cookies\indeX.dat
    @deltree/y C:\Documents and Settings\Administrator\Local Settings/HistoryHistory.IE5\indeX.dat
    @deltree/y C:\Documents and Settings\Administrator\Local Settings/Temporary Internet Files\Content.IE5\indeX.dat
    @deltree/y C:\Documents and Settings\Default User\Local Settings\History\History.IE5\indeX.dat
    @deltree/y C:\Documents and Settings\Default User\Local Settings\Temporary Internet Files\Content.IE5\indeX.dat
    @deltree/y C:\Documents and Settings\LocalService\Local Settings\History\History.IE5\indeX.dat
    @deltree/y C:\Documents and Settings\LocalService\Local Settings\Temporary Internet Files\Content.IE5\indeX.dat
    @deltree/y C:\Documents and Settings\Dan\Application Data\Microsoft\Internet Explorer\UserData\indeX.dat
    @deltree/y C:\Documents and Settings\Dan\Local Settings\Application Data\Microsoft\Feeds Cache\indeX.dat
    @deltree/y C:\Documents and Settings\Dan\Application Data\ArcSoft\PhotoImpression\Cache\1.0.0.21\indeX.dat
    @deltree/y C:\Windows\pchealth\helpctr\OfflineCache\indeX.dat
    @deltree/y C:\Windows\System32\config\systemprofile\Cookies\indeX.dat
    @deltree/y C:\Windows\system32\config\systemprofile\Local Settings\History\History.IE5\indeX.dat
    @deltree/y C:\Windows\system32\config\systemprofile\Local Settings\Temporary Internet Files\Content.IE5\indeX.dat
    @deltree/y C:\Documents and Setttings\Dan\Recent\indeX.dat
     
  2. Stack

    Stack Private E-2

    I should add, I upgraded the IE5 to IE7, so I know I'll need to change that.
    Thanks for any help on this.

    I got a smaller command from here years ago for my 98 computer. Worked great.
     
  3. Stack

    Stack Private E-2

    When I came here five years ago or so, I got this to put in the autoexec.bat

    @deltree/y c:\windows\cookies\*.*
    @deltree/y c:\windows\tempor~1\content.ie5\*.*
    @deltree/y c:\windows\cookies\index.dat
    @deltree/y C:\windows\history\*.*
    @deltree/y C:\windows\recent\*.*
    @deltree/y C:\windows\temp\*.*

    I've tried to modify it, as in the first post, but it doesn't delete anything.
    I had over six thousand cookies in there and would like it done automaticlly, if possible.
    I've tried only one code at a time, never all together.

    Anyone have any ideas?
    I'd sure apprecitate it and I'm sure a load of other folks would to.
    Thanks for any advice on how to to it, or even if it can't be done on XP.
    Thanks.
     
  4. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Try putting all in autoexec.nt in XP Let us know if it works. Bazza
     
  5. sach2

    sach2 Major Geek Extraordinaire

    I haven't messed around with XP's autoexec.bat so I can't give much help there unless I play around with it a bit more for testing.

    This link explains that you want to use RMDIR /S to remove directories

    or DEL to remove files.

    I think the warnings about not allowing global wildcards (*) is only for the recovery console version.

    *****
    You probably want to do some tests on a folder to get better control of the commands to figure out which files and particularly which directories are being deleted.

    I would make a folder C:\test\testdir and put a couple of test.txt files in there. Then make a C:\test.bat and see what the commands do. Be careful with your wildcards--you don't want to go any higher than C:\test (so del or rmdir C:\test\testdir\*.* )or you could delete WINDOWS.
     
  6. Stack

    Stack Private E-2

    bigbazza
    This is what I did.

    Made a file autoexec.nt
    Placed it in C\:
    placed "@deltree/y C:\Documents and Settings\Dan\Local Settings\Temporary Internet Files\*.*", without the ", and saved it.
    Rebooted and nothing happened. The cookies are still there. I can manually delete them, so its no like something is locking them in place.
    Thanks for helping. I really appreicate you help. :)

    I'll go see what sach2 has to say.
     
  7. Stack

    Stack Private E-2

    sach2
    Thanks for the responce.
    I went to the link and have to admit, I'm some, no, alot, confused on using the right code.

    I'll return and make a restore.
    Then I'll go back to autoexec.bat and place;

    (from the link)
    DELTREE [/Y] [drive:]path [[drive:]path[...]]

    (to auotexec.bat)
    deltree/y C:\Documents and Settings\Dan\Local Settings\Temporary Internet Files\*.*

    (the difference seems to be)
    Without the '@'. I didn't see it in the link.

    I'll let you know if I've shut down the entire web on the west coast or not, when the web gets back up and running.:-D
    I appreciate the help.
    Thanks a lot.
     
  8. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Do you need the @ sign? I think there should be a space between deltree and /y
    I have often considered using autoexec.nt in XP but never got a round tuit :-D That is why I am interested in your results. Bazza

    ===

     
  9. Stack

    Stack Private E-2

    The lights are still on and I got back on the internet. No problems there.;)

    That didn't work either.

    I don't think I understand what that link was talking about, though.
    I'll keep trying some different approaches.

    I appreciate your help. Thanks.
     
  10. Stack

    Stack Private E-2

    Bigbazza,
    I didn't see the @ on the link, but I added it the second time and still nothing.
    I just tried a space beteen the delete /y, nothing.

    I can't thank you guys enough for your advice.
    Thanks.
     
  11. sach2

    sach2 Major Geek Extraordinaire

    The deltree is not a valid command in XP. The trick will be to figure out a combination of RMDIR and DEL that allow you to delete the files and subdirectories in a folder without actually deleting the folder.

    For example you want to delete everything in folder IEcache. IEcache has lots of files and also a subfolder. DEL is used to delete files not folders. RMDIR /S will delete folders and everything in them but also deletes the containing folder. So RMDIR /s ....\IEcache will delete the IEcache folder and everything in it. If you just want to delete everything in IEcache but leave the empty folder there that will be the tricky part.
     
    Last edited: Jan 17, 2012
  12. Stack

    Stack Private E-2

    sach2

    My mind is muddled right now. Been working on this project for two days now.:eek:
    I'll horse around with that idea you found a bit later.

    What every I find, I'll let you know.
    Again, I really appreciate all the help.
    Many thanks.
    dann.
     
  13. Stack

    Stack Private E-2

    I was wondering, could this be done through the registry?

    Thanks for any help.
     
  14. sach2

    sach2 Major Geek Extraordinaire

    Hi,

    I've been looking at this and have figured a couple of syntax errors. Most importantly the file path has to be in quotes for any path that includes spaces.

    So the second half should be fine since you are deleting a specific file [I corrected a couple of "/" going the wrong way and one missing between History/History.IE5] like so:

    [By the way the History.IE5 is still the correct directory even for IE7 from what I can see on my PC].

    The second half is where the problem comes in. This code will delete most of the files in these directories but not sub-folders and their contents. I haven't figured out this part yet. It also will leave unusually named files like movie.avi.torrent (the wildcard *.* does not fit because of the extra (.) in the filename.

    [By the way, I don't see this "C:\Documents and Settings\Dan\PrivacIE\*.*" folder on my PC]

    Anyway, I attatched a copy of this code in a zipped .bat file. Try unzipping it and double-clicking to see if the syntax works.
     
    Last edited: Jan 17, 2012
  15. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Yep, check out my post #28 at http://forums.majorgeeks.com/showthread.php?t=170775 for dealing with long file names and using quotes before and after. I didn't spot this in your examples. :eek: You are getting there. :cool

    Are you using Autoexec.bat or Autoexec.nt? Bazza
    PS: Go to Start--Run--cmd <,enter> and type in del /? for the full syntax.
    Maybe you should be using /S as well as /Q to get your subdirectories.

    Use this suggestion at your own risk in case it deletes more than you want. ;) Bazza
     
    Last edited: Oct 21, 2008
  16. plodr

    plodr MajorGeek Super Extraordinaire Moderator Staff Member

  17. sach2

    sach2 Major Geek Extraordinaire

    Yesterday, I was so busy concentrating on the code and thinking about putting it in a startup script, I didn't read what it actually said. What you are trying to do is just delete private data automatically. MRUblaster should do what you want if you use the cookie and temporary files plugins [it can also delete ...\cookies\index.dat]. When installing allow it to put itself in your Start Ups and then set options to use the cookie and temp file plugins. It will only work on the current user but because XP keeps cookies and temp files separate for each user, files should only exist for you not also for Administrator and All Users.

    Another option would be something like this:

    This would accomplish the deleting files on a regular basis if used in conjunction with Task Scheduler. You could add a line for deleting ...\Recent\*.*, to get rid of recently used lists. Again, only for the current user.

    *******
    Either might be a simpler choice. I'll still help you with your code if you choose that option. but I'm not sure it has any benefits. However, I am curious about how to set up a batch file to run at startup and will explore this anyway. :)
     
  18. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Thanks sach2, I just run MRU-Blaster daily with the program defaults. I have never bothered to use other than the factory settings. As for running a batch file at Startup, I would have thought that Autoexec.nt (not Autoexec.bat) would / should take care of this. Is this correct, or not? Following this thread with interest. Bazza

    ===

     
  19. sach2

    sach2 Major Geek Extraordinaire

    Hi Bazza, I've never messed with autoexec in XP. I made a autoexec.nt yesterday as a test and it didn't execute but I haven't read up on it at all--yet ;)

    To be honest, in the last few years I've found other people have already written programs to do almost anything I thought about doing myself so I haven't had much need or practice. I'll post back on the autoexec.nt once I get one working.
     
  20. Stack

    Stack Private E-2

    Hi sach2.
    I downloaded the file.
    Opened it.
    using my very basic knowledge of dos, I clicked 'y', then enter.
    more popped up. again I clicked 'y'.
    A couple of them said they couldn't complete the task cuz it was being used by another prog.
    Well, I closed out my internet connection, and did it again, all the way to the end.
    Nothing happened. All that garbage is still there.

    -------------

    C:\Program Files\Utils\syntax for deletion\dan>del "C:\Documents and Settings\Da
    n\Local Settings\Temporary Internet Files\*.*"
    C:\Documents and Settings\Dan\Local Settings\Temporary Internet Files\*.*, Are y
    ou sure (Y/N)? y

    C:\Program Files\Utils\syntax for deletion\dan>del "C:\Documents and Settings\Ad
    ministrator\Cookies\*.*"
    C:\Documents and Settings\Administrator\Cookies\*.*, Are you sure (Y/N)? y

    C:\Program Files\Utils\syntax for deletion\dan>del "C:\Documents and Settings\Da
    n\Cookies\*.*"
    C:\Documents and Settings\Dan\Cookies\*.*, Are you sure (Y/N)? y
    C:\Documents and Settings\Dan\Cookies\index.dat
    The process cannot access the file because it is being used by another process.

    C:\Program Files\Utils\syntax for deletion\dan>del "C:\Documents and Settings\Da
    n\PrivacIE\*.*"
    Could Not Find C:\Documents and Settings\Dan\PrivacIE\*.*
    -----------------

    There's more, but I cut it short to save space.

    I was poking around following links after links and it seems others have been trying to do this also. Most say that MS has some kind of block in it or something.

    I have that file you send in a folder on C:\ drive.
    Should I move it to Autoexce.bat?

    I don't know if I did it right.
     
  21. Stack

    Stack Private E-2

    Originally Posted by sach2
    What you are trying to do is just delete private data automatically. MRUblaster should do what you want if you use the cookie and temporary files plugins [it can also delete ...\cookies\index.dat]. When installing allow it to put itself in your Start Ups and then set options to use the cookie and temp file plugins.

    However, I am curious about how to set up a batch file to run at startup and will explore this anyway.

    -----------
    Yes, just delete the cookies and history, recent and stuff like that.
    It worked so well with 982nd edition.
    I had a bunch of Megs of cookies in the Temporary Internet Files folder.
    I can delete them manually, but the ease of the older OS wanted me to come here and ask around about an auto way to do it.

    I'll snoop around and find this MRUblaster you mentioned.
    I'll get back to you.

    Thanks.
     
  22. Stack

    Stack Private E-2

    Hi plodr
    I'm about half way through the first link you put up, Langa's article about cleanup.
    Just wanted you to know I've not skipped your post.
    Thanks.
     
  23. sach2

    sach2 Major Geek Extraordinaire

    My post contained a link to Mrublaster :) I really think it will do everything you want fast and easily.

    First, I sent you a bad copy of dan.bat (I repeated lines with *.* and ignored index.dat) which would double the errors. Sorry, I had several working copies and got confused.

    My problem is I don't use IE so I am having trouble finding and creating cookies to test, my folders remain empty even after a quick browse in IE. I'll look at it more carefully before attaching a .bat again.
     
  24. Stack

    Stack Private E-2

    sach2, I downloaded the MRU prog. It does nothing in the Temporary Internet Files. I guess I'll just do it manually. Lord knows, I could use the exercise.

    I really appreciate everyone's input.
    I'll continue looking, not as vigourus as I have been, but if I do find something that will delete the file, I'll return and post it.

    Im gonna run through the other posts on this thread.
    You guys have been so helpful. Thanks.
     
  25. Stack

    Stack Private E-2

    I use to read Langa's articles all the time. The link is intersting but, I guess since the links he refers to are four and six years old, they have been taken down. That was a crucial part of the getting his prog to work on XP.

    Thanks Plogr.
     
  26. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Stack, if you are really looking to clean out all the stuff that your computer inherits after a Net Session, go to Tips 18- 21 at "From today's MajorGeeks front page-Aug 2008" at http://forums.majorgeeks.com/showthread.php?t=165925

    There you will find the 5 programs (at least) that I run daily to clean out the crap.

    CCleaner
    Cleanup!
    MRU_Blaster
    Empty Temp Folders
    and Advanced Windows Care

    They each find stuff the others miss. I usually run them one after the other every day. All are available from Major Geeks and the links are in Tips 18-21 as per above link.

    Bazza
     
  27. maybeok

    maybeok Private First Class

  28. Stack

    Stack Private E-2

    I don't know what happened, but...

    I started my computer this morning, around 10 am, and checked my mail, answered a few fans of mine, then about 30 minutes ago I thought I'd just wander back to C:\blah\blah\temp internet file.
    So I closed the browser and went up blah blah lane.
    To my suprise, the folder was empty.
    I'm mean spic & span clean. The refelctions from the floor and walls nearly blinded me. I even said, 'dag gum', and it echoed for several seconds. It's like the home invasion guys hit the temp internet folder.

    MRU worked.

    I shut down yesterday, with the thought tha maybe after installing MRU I missed the 'you need to restart your computer'. Fact is I shut it down again after than after uninstalling a small note reminder prog I had installed a few weeks ago that had become a nucience.

    I did nothing to the settings after I set them right after I installed it.
    ~ shrugs ~

    Thanks guys. I can't tell you how happy I am. I've had this machine since Sept, and when I found that folder, I had 9 gigs of garbage in there.

    Thank ye, thank ye, thank ye (in my best Gomer Pyle accent)

    Thank you!
     
  29. Stack

    Stack Private E-2

    Hey maybeok, thanks for the link.

    Everything seems to be working now.

    I copied it just in case.
    Thanks.

    I just went in and deleted the autoexce.nt and the autoexce.bat files I made.

    Thanks again everyone.
     
  30. Stack

    Stack Private E-2

    Hey, bigbazza.
    I did that yesterday and installed the MRU prog.
    Thanks for your help.
     
  31. Stack

    Stack Private E-2

    This is kinda off topic.
    10-12 years ago I had a problem with win 95. I asked everyone I had an email address for if they could help me. Someone sent me a link, to go to a gaming forum, so I followed it. It was like the link had two parts. A gaming forum, I never went there cuz I'm not into gaming, and a part that did over clocking and stuff like that. The over clocking part of the link also answered questions ans gave advice. They spent days, I think it was over a week, walking me through the process of getting my machine back in working order.

    The guys back then were so helpful and really did some digging to help me then, just as you guys did this past week. I don't remember anyone's handle from back then, except AbbySue, or something like that.
    I'm continually placing a link to this site when I hear someone needing help with there machine.
    Thanks again, to the guys back then and the guys now.
    ~ tip my hat to you all ~
     
  32. plodr

    plodr MajorGeek Super Extraordinaire Moderator Staff Member

  33. Stack

    Stack Private E-2

    Thanks plodr.
    She wouldn't remember me. I don't recall if I ever spoke to her. I just knew her by name and being the first lady to give computer advice here, that I knew of. She was informative back then, I bet she's made Captian by now.:)

    Thanks again, plodr for your help.
     
  34. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Stack, I hope you installed all 5 programs. Run them in the sequence that I listed them and see that each picks up stuff the previous one/s missed. :cool
    I've been using most of them for years with no conflicts and no problems.

    Bazza
    ===

     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds