Anyway, here goes.
I am having a hard time figuring out how to return only fixed length filenames that has been specified... like ????.exe, & would also like to know if there's a way to specify what not to include in the names, like _ . or any non-alphanumeric character.
I have tried the following, but I just don't know how to deal with forcing the return of FIXED length filenames only.
Expand|Select|Wrap|Line Numbers
- @echo off
- echo.
- echo ####################################################################
- echo File Deleter v1.0 - 2012 by: DTeCH
- echo ####################################################################
- echo.
- if exist %APPDATA%\????.exe goto Detected <-----( Here )
- if not exist %APPDATA%\????.exe goto NotDetected <-----( Here )
- :Detected
- echo Files Detected. Deleting...
- cd %APPDATA%
- del ????.dll /s <-----( Here )
- echo.
- echo Done :)
- echo.
- goto LetsContinue
- :NotDetected
- echo Files NOT Detected... Hooray!
- echo :D
- echo.
- :LetsContinue
- echo ####################################################################
- echo.
- TIMEOUT /T 15 /NOBREAK
The Wild Card character * allows any length of characters to match, & returns unwanted files. I need to return only specific length file names.
*.exe does not work for this. Is there any other characters I can use to specify a fixed length of chars, or some other method?
Can someone shine a light here for me please? :)
Thanks.