Skip to content

Commit

Permalink
pickup changes to project template
Browse files Browse the repository at this point in the history
  • Loading branch information
mle2718 authored Oct 9, 2024
1 parent 1601681 commit 3fe4770
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stata_code/ado/vintage_lookup_and_reset.ado
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
/* a small program that looks into the data folder to find the most recent vintage string*/
cap program drop vintage_lookup_and_reset
program vintage_lookup_and_reset
syntax [, search_folder(string)]

if "`search_folder'" == "" {
local search_folder="$data_main"
}

/* Look through the data_main folder to see what data vintages are available */

local data_vintage : dir "${data_main}" files "*.dta"
local data_vintage : dir "`search_folder'" files "*.dta"
local data_vintage: subinstr local data_vintage ".dta" "", all

/* look through all the files and pick out the unique vintages, which are in the last 10 characters */
Expand Down

0 comments on commit 3fe4770

Please sign in to comment.