I am trying to delete all items NOT .aspx, but i wasn't sure how to do it. Right now i was just going through everything with
del /F *.html
del /F *.csproj
del /F *.ico
etc.
Is there a simpler command to just say: DELETE EVERYTHING in DIRECTORY NOT a FOLDER OR has an extension of .aspx
I cant seem to find a solution on the Internet which matches my question. I didn't know if DEL accepted Regex to be like /^.*(^\.aspx)$
or something
bash file says:
chdir C:\Users\william.francis\Desktop\Deploy\tmp
for /f "delims=ÿ" %a in ('dir /b /a-d ^| find /v ".aspx"') do del /s /q /f %a
chdir ..
Edit: would like a reason as to the downvotes so i could fix it. I find this question to be valid enough to not get penalized. shrug