ietoolkit icon indicating copy to clipboard operation
ietoolkit copied to clipboard

New command : compress all - reduces file size in folder

Open kbjarkefur opened this issue 5 years ago • 1 comments

This was based on a discussion with @bbdaniels and @luizaandrade .

The command compress in Stata is rarely used. This command should take all .dta files in a folder and apply the compress command and replace the original file with the compressed file.

Options to include:

  • recursive : include .dta files in subfolder to this folder

Things to think about :

  • How to report when data sets cannot be opened
  • Keep track of how much space was saved

kbjarkefur avatar Mar 27 '19 19:03 kbjarkefur

First working version in f07b144c0f2d82129a9988fca3bd6ff0e433ec74

What is left to do is:

  • Error handling. What to do if:
    • A file is not a Stata data file but has the .dta extension
    • A file is too new for the version of Stata that is the command is run in
  • Outputs. Display saved desk space for each file and aggregates in a table or something

kbjarkefur avatar Mar 27 '19 20:03 kbjarkefur