The below code acquires all files having below format and stores the name and location in a text file.
( pushd C:\Users\<User_name>\
dir /s /b *.jpg *.png
popd ) > Image_Files.txt
FOR /F "tokens=2 delims=:" %%D in ('find /c /v "" Image_Files.txt') DO SET /a ImageCnt=%%D
Is there a way to integrate the extensions from a excel file instead of mentioning it in the code ?
For example : In excel, Name : new.xlsx... say Sheet3, Cell A1-AX have different extensions:
A1 = *.jpg
A2 = *.png
And so on, Instead of mentioning in the code, is there a way to get these extensions and search for the files ?
Aucun commentaire:
Enregistrer un commentaire