`Felix` Posted March 13, 2005 Share Posted March 13, 2005 Hello all,I am currently using the following script to list some files that areknown to be in the system32 folder, however i was wondering if there isa cleaner way of doing the same thing?@echo offclsset dr1=%windir%\system32set fnd1=dir/s/b %dr1%\ImagX7.dll %dr1%\ImagXpr7.dll %dr1%\ImagXR7.dll%dr1%\ImagXRA7.dll %dr1%\nerocd95.vxd %dr1%\NeroCheck.exe%dr1%\oleaut32.dll %dr1%\picn20.dll %dr1%\stdole2.tlb%dr1%\TwnLib20.dll %dr1%\TwnLib4.dllfor /f "usebackq delims= tokens=1,2*" %%i in (`%fnd1%`) do echo %%iAll responses very appreciated Link to comment Share on other sites More sharing options...
un4given1 Posted March 13, 2005 Share Posted March 13, 2005 What exactly are you attempting to do? Link to comment Share on other sites More sharing options...
`Felix` Posted March 13, 2005 Author Share Posted March 13, 2005 What exactly are you attempting to do?<{POST_SNAPBACK}>the end result will be to automatically delete the files that match the list from the %windir%\system32 folder. Link to comment Share on other sites More sharing options...
IcemanND Posted March 13, 2005 Share Posted March 13, 2005 @echo offclsfor %%i in (ImagX7.dll ImagXpr7.dll ImagXR7.dll ImagXRA7.dll nerocd95.vxd NeroCheck.exe oleaut32.dll picn20.dll stdole2.tlb TwnLib20.dll TwnLib4.dll) do if exist %%i (del %%i) else (echo %%i not found)Short enough? Link to comment Share on other sites More sharing options...
`Felix` Posted March 13, 2005 Author Share Posted March 13, 2005 @echo offclsfor %%i in (ImagX7.dll ImagXpr7.dll ImagXR7.dll ImagXRA7.dll nerocd95.vxd NeroCheck.exe oleaut32.dll picn20.dll stdole2.tlb TwnLib20.dll TwnLib4.dll) do if exist %%i (del %%i) else (echo %%i not found)Short enough?<{POST_SNAPBACK}>this works perfectly - thanks Iceman for %%i in (ImagX7.dll ImagXpr7.dll ImagXR7.dll ImagXRA7.dll nerocd95.vxd NeroCheck.exe oleaut32.dll picn20.dll stdole2.tlb TwnLib20.dll TwnLib4.dll) do if exist %windir%\system32\%%i (del /q "%windir%\system32\%%i") Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now