Let's say I have a folder with 80 localizations. Since I do speak only two languages, I do not need the remaining 78. Of course IĀ could type del /S /F /Q for every single one of them.

But I wonder if there's a way to specify file names that are to stay, and run a for command for every file in a directory. Is this possible?

link|improve this question

67% accept rate
feedback

1 Answer

up vote 2 down vote accepted

The most painless way would be to give a distinguishing attribute to those 2 files:
attrib +R english
attrib +R otherlang
then delete every file that doesn't have that attribute:
del /A:-R *.*
Then you can clear the attributes if you wish.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.