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!!
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!!
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,
I know this works in XP so it may be worth looking at.
Go to the root of the drive
C:
then type
del /s *.tmp *.temp *.dmp
For more info type del /?
HTH
Bookmarks