1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

batch files for cleanup

Discussion in 'Legacy Windows' started by abrammiller, 2002/05/05.

Thread Status:
Not open for further replies.
  1. 2002/05/05
    abrammiller

    abrammiller Inactive Thread Starter

    Joined:
    2002/05/05
    Messages:
    31
    Likes Received:
    0
    Prior to Win2k,I used to clean out directories with *.bat files, such as
    "del c:\windows\temp\*.*" (or cache files, or....),
    This does not seem to work on
    "delete C:\Documents and Settings\Administrator\Local Settings\Temp ".
    Is that part of increased Windows self protection? What WOULD work?
    Some other gripes seem to be fixed in M.S. PowerTools for WinXP, but they disabled it for Win2k. I really would have liked to use that kit's "cmdhere.exe" to open DOS window other than at C:\.
    thanks in advance.
     
  2. 2002/05/05
    Zephyr

    Zephyr Inactive

    Joined:
    2002/01/21
    Messages:
    1,519
    Likes Received:
    0
    I had a similar problem when I recently changed to XP Home Edition.

    I finally got it ironed out to this:

    @ECHO OFF
    echo y | rd/s c:\temp\
    echo y | rd/s c:\windows\temp\
    md c:\temp
    md c:\windows\temp

    The problem is some of the old DOS commands aren't recognized in the NT system so you'll have to get retrained. :(
     

  3. to hide this advert.

  4. 2002/05/05
    unixfan

    unixfan Inactive

    Joined:
    2002/01/26
    Messages:
    282
    Likes Received:
    0
  5. 2002/05/05
    abrammiller

    abrammiller Inactive Thread Starter

    Joined:
    2002/05/05
    Messages:
    31
    Likes Received:
    0
    Thanks for your fast response. Yep, I figured I'd have to learn some new tricks, but this dog is not THAT old. I find it interesting that Win2k finally has pushd and popd built in.... but those also did not let my modified batch files remove those security violation files.
    From your post, I see that the "home" version simplifies things by not having both admin and user logins.
    Again, thanks.
     
  6. 2002/05/05
    Zephyr

    Zephyr Inactive

    Joined:
    2002/01/21
    Messages:
    1,519
    Likes Received:
    0
    The Environmental Variables are editable in XP and I think I moved my Temp folder from that godawful path it comes set to, like on your, and placed it at plain old C:\temp.

    I'm not sure you have that ability in 2k. I just have to right click the My Computer icon and select Properties and then click the Advanced tab and then the Environmental Variables button and there it is ready for me to tamper with.

    Somehow C:\Documents and Settings\Owner\Temp just didn't sing for me.

    Another strange thing that kept some of my batch files from working was the default PATH set by XP. It was

    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program files\PC-Doctor for Windows XP\WINDSAPI

    That seemed strange since it didn't mention the c:\ root. I added
    PATH=%PATH%C:\;C:\program files\winzip to my Autoexec.bat file and everything started working fine.

    That reminds me, I still need to change that in the EV applet and delete it from my Autoexec.bat now that I have since discovered that feature.

    I hope some of this is applicable to your situation.

    Good luck.

    ps, Paste the following command in your RUN field and it'll show you all the commands and explain their switches and use:
    hh.exe ms-its:C:\WINDOWS\Help\ntcmds.chm::/ntcmds.htm
     
    Last edited: 2002/05/05
  7. 2002/05/06
    Newt

    Newt Inactive

    Joined:
    2002/01/07
    Messages:
    10,974
    Likes Received:
    2
    Zephyr - I like that shortcut to the particular help section you put in at the bottom. Good stuff.

    But I gotta know - where did you find it?
     
    Newt,
    #6
  8. 2002/05/06
    Zephyr

    Zephyr Inactive

    Joined:
    2002/01/21
    Messages:
    1,519
    Likes Received:
    0
    Hi Newt!

    That came from Grembo's Hanger and I'm glad you asked so proper credit can be given to an excellent treasure trove of a site.

    There's so much good stuff there my head 'bout exploded.

    It's a little circuitous so I'll give you some directions.

    From the Home page > click START > then on the left side of the resultant page click TECH TIPS > the from next page click XP > then click XP COMMAND LINE UTILITIES link. Then you will have to scroll and rabbit hunt for that particular tip or else enter it in the "Find on this page" field. It's buried in there with a lot of other good tips.

    I haven't had time to digest it all yet but it sure looked promising. I notice they have a forum as well.

    Good luck.

    ps, Best viewed at 1024x768 if you have the eyes yet. :)
     
    Last edited: 2002/05/06
  9. 2002/05/07
    Newt

    Newt Inactive

    Joined:
    2002/01/07
    Messages:
    10,974
    Likes Received:
    2
    Nice site. Will take some digesting though. Added to favorites for future visitation.
     
    Newt,
    #8
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.