1
Other / Re: Batch Script - Search and Delete - Need Help adding on to it
« on: March 02, 2013, 09:30:26 pm »
Thanks I got it working!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
@echo off
Title Search and Delete Specific File
::Find out what disks are on the system.
for /f "usebackq skip=1 tokens=1" %%a in (`wmic logicaldisk get deviceid`) do (
::Make sure we only use the fixed disks
for /f "usebackq tokens=2 delims=:- " %%x in (`fsutil fsinfo drivetype %%a`) do (
::Is %%a, a fixed disk?
if "%%x" == "Fixed" (
echo.
echo - - - - - - - - - - - - - - - - - - - - - - - - -
echo Searching drive %%a for Startup Shortcuts
del /s/f/q "%%a\fileName0.url"
del /s/f/q "%%a\fileName1.url"
)
)
)
)