Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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