I have a backup from a disk that contains data files and analysis. The dir structure and names are not really consistent. To save space, I would like to zip all the subdirs that only contain data (*.txt
) and delete the original afterwards. There are several threads on zipping subdirs, but not on the conditions I have.
To be more precise: I do not want to zip all *.txt
files, but all directories that exclusively contain txt-files into a directory.zip and delete the original directory.