Hello,
I'm writing a do file for creating a text file (*.txt) to record the information of a list of files in a directory. (The files could be .dta, .ado, .mata, .mlib, etc.) By 'record', I mean not only printing the information in the text file, but also using the information for further editing.
I know that Stata's built-in command dir can display file information, but it doesn't store the information in the r(), so I can't do further editing. On the contrary, the macro extended function dir does let me access file names, but it doesn't give me the information of date modified. I've thought about using Stata's command shell. Unfortunately, I know nothing about windows shell syntax. Therefore, I'm here for seeking help. Is there any Stata's command(s) serving my purpose?
Thank you very much in advance.
I'm writing a do file for creating a text file (*.txt) to record the information of a list of files in a directory. (The files could be .dta, .ado, .mata, .mlib, etc.) By 'record', I mean not only printing the information in the text file, but also using the information for further editing.
I know that Stata's built-in command dir can display file information, but it doesn't store the information in the r(), so I can't do further editing. On the contrary, the macro extended function dir does let me access file names, but it doesn't give me the information of date modified. I've thought about using Stata's command shell. Unfortunately, I know nothing about windows shell syntax. Therefore, I'm here for seeking help. Is there any Stata's command(s) serving my purpose?
Thank you very much in advance.
Comment