Re: Script to search for and delete all files with extension xxx



Create a file call DEL-xyz.cmd with notepad and enter the following:

@echo off
for /f "tokens=*" %%j in ('dir /B /s *.tmp') do del /Q "%%j"
for /f "tokens=*" %%j in ('dir /B /s *.temp') do del /Q "%%j"
for /f "tokens=*" %%j in ('dir /B /s *.dmp') do del /Q "%%j"

And run it from the directory you wnat to clean up. it can be from the root
of a drive.

Have fun!

Jacques,

"Mike62" <Mike62@xxxxxxxxxxxxxxxxxxxxxxxxx> a écrit dans le message de news:
EEEDD4B5-B2B2-4E80-A467-B7C3B726147B@xxxxxxxxxxxxxxxx
I need a script to delete files with a extension of tmp, temp, and dmp.

This is probably really simple, I'm new to scripting.

also i need it to search just the local drives, no mapped drives.

Thanks in advance!!


.



Relevant Pages

  • Re: SATA drives
    ... OK, if this is Dani's driver, the last level of her code that would work as a renamed driver for OS/2 to the IBM1S506.ADD name was I think 1.7.10 per my notes. ... As to 1.6 level code working with SATA drives seen as an ATAPI device, ... If you didn't install that but chose to stay with an earlier Fix Pack, they also released a custom fix for the issue that at least started with a custom DHCPCD.EXE dated February 9, 2004, that began this process. ... echo UPKERNEL.CMD for OS/2 Warp 4.5 ...
    (comp.os.os2.setup.misc)
  • Re: Cloned Drive XP Pro showing hal.dll error
    ... showed clean; ditto on a chkdsk in the ... Shaun Grey post off the Segate link you provided. ... I suppose running the diagnostics again ... drives are clean physically and for viruses. ...
    (microsoft.public.windowsxp.basics)
  • RE: 1305 error
    ... Clean and Examine the CD ... Use a CD-ROM cleaning kit, or gently wipe the silver side of the CD-ROM ... If the disc still does not perform correctly, clean the disc by using warm ... Note Shared drives and shared folders can be mapped. ...
    (microsoft.public.office.setup)
  • Re: Need Help with a DOS script (if possible)
    ... Closes Command Prompt ... echo Checking the target folder xxx%Target%yyy ... Will this work on either network drives, ...
    (microsoft.public.windowsxp.general)
  • RE: cannot install from existing UFS thumb drive with sysinstall
    ... There is a outstanding PR on sysinstall from usb flash drive which is now ... The sysinstall install program needs to be updated to use ... usb drives as the source of the install media. ... echo " " ...
    (freebsd-questions)