I have the following windows-batch script to iterate over all the files in the current directory:
FOR %%F in (%CD%\*.*) DO ( :: I am doing my process here )
I know that I can iterate over a specific file type with *.ext, but I need to skip all the file types below and ignore all the other types that are also in a single loop FOR:
*.ext
FOR
php phtml css js sql xml
How can I achieve this by making at least small changes to my code?
I am not very good at batch scripting, so any help would be greatly appreciated.
?
for %%I in (*.php *.phtml *.css *.js *.sql *.xml) do echo "%%I"
, , , :
for /F "delims=" %%I in ('dir /A-D /B *.php *.phtml *.css *.js *.sql *.xml 2^>nul') do echo "%%I"
DIR , , , - FOR - , FOR, DIR, , , , , , , , .
for /? dir /? , .
for /?
dir /?
Source: https://habr.com/ru/post/1682287/More articles:Spring Boot may find resource file, but Java class does not work with NullPointerException - javaFind out if anyone has a role - javascripttransforming a peaceful time sequence in time - phpOpenGL 4.5 - mock buffer shader storage layout - c ++How to use paginator from angular material? - angularWhy is my smallIcon for notifications always grayed out? - androidHow to remove quotation marks and get list in python? - pythonDifferent random numbers at the same time - randomCount sequences of numbers - rThreshold in Android using opencv - androidAll Articles