Anyone Know DOS Here?

Discussion in 'Virus Information' started by David H. Lipman, Jul 20, 2004.

  1. Neither of the News Groups you posted to are apropos to DOS scripting.

    Please post On Topic matter !

    Dave




    |
    | I need help to write a short DOS file to delete everything in:
    | C:\WINDOWS\Temporary Internet Files\Content.IE5
    |
    | To go into C:\WINDOWS\Temporary Internet Files\
    | C:\ drive, I type <cd\windows\tempor~1>
    | I go into C:\WINDOWS\Temporary Internet Files\
    | If I type <Del*.*>
    | Everything inside the folder deleted.
    |
    | To go into C:\WINDOWS\Temporary Internet Files\Content.IE5\
    | I type <cd\windows\tempor~1\conten~1\>
    | I get Invalid directory
    |
    | Below is my "Clean.bat"
    |
    | Start==================
    | cls
    | cd c:\windows\cookies
    | del *.*
    |
    | cd\windows\temp
    | Del *.*
    |
    | cd\windows\tempor~1
    | Del *.*
    |
    | cd\windows\tempor~1\conten~1
    | Del *.*
    |
    | e:\
    | cd\everest\adcache
    | del *.*
    | end==============
    |
    |
    |
     
    David H. Lipman, Jul 20, 2004
    #1
    1. Advertisements

  2. David H. Lipman

    Jim B Guest

    I need help to write a short DOS file to delete everything in:
    C:\WINDOWS\Temporary Internet Files\Content.IE5

    To go into C:\WINDOWS\Temporary Internet Files\
    C:\ drive, I type <cd\windows\tempor~1>
    I go into C:\WINDOWS\Temporary Internet Files\
    If I type <Del*.*>
    Everything inside the folder deleted.

    To go into C:\WINDOWS\Temporary Internet Files\Content.IE5\
    I type <cd\windows\tempor~1\conten~1\>
    I get Invalid directory

    Below is my "Clean.bat"

    Start==================
    cls
    cd c:\windows\cookies
    del *.*

    cd\windows\temp
    Del *.*

    cd\windows\tempor~1
    Del *.*

    cd\windows\tempor~1\conten~1
    Del *.*

    e:\
    cd\everest\adcache
    del *.*
    end==============
     
    Jim B, Jul 21, 2004
    #2
    1. Advertisements

  3. David H. Lipman

    PLS Guest

    try;
    DEL C:\WINDOWS\*.TMP
    DELTREE /Y C:\TEMP\*.*
    DELTREE /Y C:\WINDOWS\TEMP\*.*
    DELTREE /Y "C:\WINDOWS\Temporary Internet Files\Content.IE5"
     
    PLS, Jul 21, 2004
    #3
  4. David H. Lipman

    Jim B Guest

    Hey, would you believe it WORK!! THANKS
    Can you tell me what "/Y" do?
    I always though DOS will not recognize more than 5 characters. When I use
    "conten~1" it becomes an invalid directory.

    Thanks, can you help further, how and where do I insert this batch file to
    execute either at starting or shutting down the computer.

    At the present moment, I run this batch file once in a while when I Shut-Down
    and Restart in MS-DOS Mode.
     
    Jim B, Jul 21, 2004
    #4
  5. David H. Lipman

    PLS Guest

    the /y is required by deltree to keep it from waiting for
    an input. I used it by naming in cleanup.bat putting a shortcut
    to it in the windows startup folder. This does not work
    in XP. I've only used it in win98 or 95.

     
    PLS, Jul 21, 2004
    #5
  6. David H. Lipman

    Bob Troll Guest

    I'm an old batch file writer from way back. PLS is correct in saying this
    would work in Win9x and I added it to my autoexec.bat file when I used 98.
    The trouble with XP is there is no DOS, plus if your drive is partitioned
    NTFS you are doubly screwed because DOS doesn't know what a NTFS file system
    is or how to make use of it in any case.

    Just FYI. DOS deals with a maximum filename length of 11 characters
    including the file's extension. So for example (filename.txt) would
    be a good dos name but (filenamesandra.txt) would get truncated to
    something like (filenam~1.txt) which you have probably seen on many
    occasions. This is a normal course of events for dos dealing with long file
    names.

    While reading this thread I took a peek at my windows/temp folder for grins
    and only found 47 pretty much empty folders hanging about, so to the bin
    they went.

    Billy doesn't have to buy us any hard drives so why would he worry if ours
    filled up with a lot of totally useless crap? In my opinion XP is not at all
    tidy in it's cleaning up after itself. I would love to run into a registry
    cleaner that actually works too. I haven't seen any of them actually roll up
    their sleeves and get down to doing a real clean up job. Oh sure, some will
    go in there and show you a list of things that it found but in reality there
    is still scads of garbage still floating around.

    Keep in mind that with my limited experience with XP I have come to a couple
    of conclusions, one of which is that XP NEVER forgets anything! I've noticed
    that when I was dorking around in my registry and ran across about a half
    dozen listings in several different areas for hard drives and optical
    devices that are not even hooked up to this beast anymore. I could go on and
    on and on, but what's the point?

    I can give you one solid example of this nuisance behavior. If you merely
    change the firmware on your optical device, when you reboot XP will find a
    brand new optical device and add it to the registry for you. Of course the
    old drive will also still be there in the listings just in case you bring it
    back I suppose. I discovered that if you do the firmware change and then go
    to the device mangler and uninstall the drive, when you reboot XP will find
    a new drive like it should BUT the old one now has been cleaned out of the
    registry. This is a good thing for us!

    Like the USA, with all of it's faults, XP is still pretty good, even though
    I mutter and grumble every time I want to do things my way and XP insists on
    knowing what's best for me......

    Regards, Bob "hopelessly insane machine warrior" Troll
     
    Bob Troll, Jul 21, 2004
    #6
  7. David H. Lipman

    Lance Guest

    This is what I use for WinXP. It's only so-so because it deletes the
    files, but leaves empty folders:

    *** Listing of DelTemp.bat ***
    cd "c:\documents and settings\<user>\cookies"
    del /q *.*
    cd "c:\documents and settings\<user>\local settings\temp"
    del /q *.*
    cd "c:\documents and settings\<user>\local settings\temporary internet
    files\content.ie5"
    del /q /s /f *.*
    cd "c:\documents and settings\<user>\local settings\temporary internet
    files"
    del /q /s /f *.*
    cd \
    *****************

    You can find out what the switches do by opening the command window and
    typing in:

    C:\> del /?

    Lance
    *****



    Jim B thought carefully and wrote on 7/20/2004 6:48 PM:
     
    Lance, Jul 21, 2004
    #7
  8. True, XP doesn't have a "real" DOS but there is a DOS-like command prompt
    environment. Moreover, "Windows Scripting" is infinitely more powerful,
    once you get your head around the "wrapper". TechNet are running a week of
    webcasts on Windows Scripting this week, and there are vast resources on the
    MS website on the subject.

    See
    http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032256426&Culture=en-US
    (webcast available on demand), or
    http://www.microsoft.com/technet/scriptcenter/default.mspx
    and especially:
    http://www.microsoft.com/technet/community/scriptcenter/tools/wmimatic.mspx
     
    Philip Herlihy, Jul 21, 2004
    #8
  9. David H. Lipman

    Bob Troll Guest

    We really do need to keep up or at least try if we are to be successful
    nowadays. Thanks for the link to the scriptomatic information. I'll play
    around with it and see what comes up. I'm basically lazy and getting tired
    of having to learn all over again every few years. It seems that just as I
    get to the point where I think I actually know what I'm talking about, it
    all changes........

    Regards, Bob "hopelessly insane (and tired of Bill G taking control of my
    computer) machine warrior" Troll
     
    Bob Troll, Jul 21, 2004
    #9
  10. (Sigh...)

    I know EXACTLY what you mean...
     
    Philip Herlihy, Jul 21, 2004
    #10
  11. David H. Lipman

    Jim B Guest

    On Wed, 21 Jul 2004 11:06:02 -0700, David H. Lipman

    Sorry, Netcop I did know you own this newsgroup!

    There are time even you need help and didn't know where to start.
    I'm desperate trying to find ways remove unwanted files/viruses/whatever that
    generated in my computer. One could come here to look for software solution,
    suggestion from netter's or maybe write your own program if you are smart
    enough. I choose to write a simple scripts in DOS, and I encounter problems. And
    that's what I did, I start here.

    Please be nice and not everyone are as smart as you.
     
    Jim B, Jul 22, 2004
    #11
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.