0
votes

I have got several image files in one folder sharing the same filename but have a different suffix
i.e:

textures\texture_suffix.dds
textures\texture_suffix1.dds
...
textures\texture_suffix10.dds

Using a batch I want to create subfolders named Texture.Suffix, Texture.Suffix2 based on the suffix of the files under textures, then move the respective file into its subfolder and rename it 'texture.dds'.

Can this be done using batch file?

Thanks for any help.

1
Yes, this can be done, but if you don't code yourself why not use any of the existing utilities to do just that because stackoverflow isn't a 1-800-coding-service. - wOxxOm
I am sorry, I didn't want to tread on anyone's foot. I Just wanted to know how this can be done with Windows so I can learn how to code this and transfer the knowledge for future tasks. Despite that I don't want install any of the existing for something very basic. - McNobody
Well if you're really interested you should search for similar questions, try something, edit the question and add the code you tried to adapt with a specific question. That's how stackoverflow usually works. - wOxxOm

1 Answers

0
votes
cd textures
for /f %%i in ('dir /b /s') do (
md %%~ni
move %%i %%~ni\ )
pause

write these tags in a bat file and run the bat file in the same directory that includes textures directory