Hi friends
Is there any way to allow selection of multiple files to pass to a macro that I can iterate through, perhaps something like tk_choose.files in the R tcltk library? I'd then iterate through the file names in the macro to create an aggregate.
Due to a variety of issues with changes in file names, etc. the most desirable way to implement this, I think, is using something like fopen but allowing a user to select multiple files which could be passed to a macro. Relying on standard file names or a repository directory where new files are placed and all are imported using a macro extended function isn't a viable option.
Right now, I'm iterating through file selections using fopen to construct the macro based on the _rc value with each iteration and it works as expected but I was wondering if there was a more elegant solution.
Is there any way to allow selection of multiple files to pass to a macro that I can iterate through, perhaps something like tk_choose.files in the R tcltk library? I'd then iterate through the file names in the macro to create an aggregate.
Due to a variety of issues with changes in file names, etc. the most desirable way to implement this, I think, is using something like fopen but allowing a user to select multiple files which could be passed to a macro. Relying on standard file names or a repository directory where new files are placed and all are imported using a macro extended function isn't a viable option.
Right now, I'm iterating through file selections using fopen to construct the macro based on the _rc value with each iteration and it works as expected but I was wondering if there was a more elegant solution.
Code:
loc exit=0 while `exit'==0{ capture window fopen D_dta "Select a dataset to use:" "Stata Data (*.dta)|*.dta|All Files (*.*)|*.*" dta loc exit=_rc loc files `files' $D_dta }
Comment