Menu

gzip -r (for windows)

Help
K.Roth
2007-10-03
2012-07-26
  • K.Roth

    K.Roth - 2007-10-03

    I want to gzip recursively all ".txt" files in a certain directory, using the windows command window. Is that possible?
    Commands like
    >gzip -r tree*.txt
    do not seem to work recursively. gzips only the files on first level (.\tree).
    Thanks in advance. -karl

     
    • GnuWin

      GnuWin - 2007-10-15

      According to the manual, gzip archives the files given as arguments and, when one of the arguments is a subdirectory, the files in that subdirectory. So, it does not seem possible to gzip the files recursively. You'll have to create a list of files first, e.g. with find from the findutils, and then give these as arguments to gzip. For example:

      find.exe tree -name "*.txt" -exec gzip.exe -kvr "{}" ";"

       
MongoDB Logo MongoDB