1.

Solve : Trouble erasing files?

Answer»

Quote from: geoffl on August 04, 2012, 06:35:32 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.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.If you have now got a solution for erasing all files without a prompt, my advice is don't worry about it.
Thank you for your help. It is greatly appreciated.
GeofflI love to take a tomcat to a dog show!

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

Quote from: TheShadow on August 13, 2012, 03:23:31 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


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


Discussion

No Comment Found