I’m trying to automate a little tedious process I have to go through while updating files on my server. I have a content folder, with a lot of subfolders, each potentially containing some files. Some files have a compressed version (ending with .bz2). So a folder could have something like:
sound1.wav
sound1.wav.bz2
sound2.wav
texture1.tex
texture2.tex
texture2.tex.bz2
What I want to do is remove every file (somewhere in the content folder) that has an equivalent compressed file. Meaning in the above example I just want ‘texture2.tex’ and ‘sound1.wav’ removed.
Or, at the command line instead of in a batch file: