Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Trouble erasing files  (Read 10238 times)

0 Members and 1 Guest are viewing this topic.

foxidrive



    Specialist
  • Thanked: 268
  • Experience: Experienced
  • OS: Windows 8
Re: Trouble erasing files
« Reply #15 on: August 04, 2012, 06:50:11 AM »
Using ntvdm in XP

Both my solutions work in XP in a batch file running under cmd or command.  I think you have typo'd something - they also work as far back as MSDOS V6.22 IIRC.

When you say ntvdm, do you mean DosBox or do you simply click on a batch file and it runs in a CMD prompt?
Or do you type COMMAND to open a command shell?

It makes no difference as you have a solution - but the options I provided work just fine.

geoffl

    Topic Starter


    Intermediate

    • Experience: Beginner
    • OS: Unknown
    Re: Trouble erasing files
    « Reply #16 on: August 04, 2012, 07:23:58 AM »
    To run my stuff I create an icon by new, shortcut, and load my com file. The .PIF it makes is different from the one you get if you load a .bat file. The .PIF has no shortcut tab - but allows you to load autoexec and config files. These differences I thought were running under XP or running under ntvdm. I have a device which will run under the second option but not the first so there must be a difference.

    Salmon Trout

    • Guest
    Re: Trouble erasing files
    « Reply #17 on: August 04, 2012, 07:28:13 AM »
    If you have now got a solution for erasing all files without a prompt, my advice is don't worry about it.

    geoffl

      Topic Starter


      Intermediate

      • Experience: Beginner
      • OS: Unknown
      Re: Trouble erasing files
      « Reply #18 on: August 04, 2012, 04:26:12 PM »
      Thank you for your help. It is greatly appreciated.
      Geoffl

      TheShadow



        Hopeful

      • Retiree in Florida
      • Thanked: 13
        • Yes
        • The Doctor
      • Certifications: List
      • Computer: Specs
      • Experience: Guru
      • OS: Windows XP
      Re: Trouble erasing files
      « Reply #19 on: August 13, 2012, 03:23:31 PM »
      I love to take a tomcat to a dog show!  ;D ;D ;D ;D ;D

      In DOS and even in win-XP there is a little known command that MS has tried to forget that they ever wrote.

      It's "Deltree.exe" .   It's a combination of the two words Delete and TREE, because that's exactly what it can do..."delete an entire tree structure".
      It will not run in Vista, Win-7 or Win-8.

      Add the /y switch and Deltree could delete an entire hard drive and never ask the dumb question "Are you Sure?".
      My secretary actually did that to me once....she was trying to erase some floppy disks and she forgot to put in the drive letter "A:".  Deltree erased my hard drive, by default.

      For instance:
      deltree /y C:\*.*    will delete an entire C: drive.
      deltree /y "C:\Windows\temp\*.*"    will delete all the files and any sub-folders in the Windows\temp folder.
      deltree /y "C:\xyz.txt" would just delete the one file "xyz.txt" from the root directory of C:

      So it's either as general or specific as you make it with your syntax.

      I use it in my XPCleanup.bat program which cleans up all the junk in my Windows XP, C: drive, which I keep in FAT-32 format.
      I run that batch file from my desktop, from my Startup folder and from my Ghost boot disk.

      Cheers Mates!
      The Shadow  8)

      Experience is truly the best teacher.
      Backup! Backup! Backup!  Ghost Rocks!

      Salmon Trout

      • Guest
      Re: Trouble erasing files
      « Reply #20 on: August 13, 2012, 03:59:37 PM »
      It's "Deltree.exe" .   It's a combination of the two words Delete and TREE, because that's exactly what it can do..."delete an entire tree structure".
      It will not run in Vista, Win-7 or Win-8.

      No, but RMDIR will, and RMDIR /S /Q C:\ does the same as DELTREE /y C:\*.*, doesn't it?

      http://www.infocellar.com/winxp/rmdir.htm



      TheShadow



        Hopeful

      • Retiree in Florida
      • Thanked: 13
        • Yes
        • The Doctor
      • Certifications: List
      • Computer: Specs
      • Experience: Guru
      • OS: Windows XP
      Re: Trouble erasing files
      « Reply #21 on: September 22, 2012, 06:37:17 AM »
      Close, but no cigar!

      I can use Deltree to remove just one type of file, like .tmp from a large directory like Windows.
      I don't see any way to use the RD command to do that.
      There are many times when I don't want to remove a directory, just one file or one type of file in the directory.

      For just one file, I can always use the 'Delete' command.  Oh well, time marches on and we must adjust accordingly.
      Thanks for all the input.
      The Shadow  8)
      Experience is truly the best teacher.
      Backup! Backup! Backup!  Ghost Rocks!