Skip to content

Instantly share code, notes, and snippets.

@bbdaniels
Created March 7, 2024 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbdaniels/05fe86c25492cbf43dcbacd4e9153519 to your computer and use it in GitHub Desktop.
Save bbdaniels/05fe86c25492cbf43dcbacd4e9153519 to your computer and use it in GitHub Desktop.
Bulk copy files
// Move data from Box to git location
foreach file in `: dir "${box}/constructed/" files "*.dta" ' {
local file = subinstr("`file'",".dta","",.)
iecodebook export "${box}/constructed/`file'.dta" ///
using "${git}/data/`file'.xlsx" ///
, save replace sign reset
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment