Hi everyone,
I wish to rename some excel files on STATA so that only the first 4 characters appear for each file. I ran the following command:
local files: dir "C:\Users\Dell\OneDrive - The University of Nottingham\DISE" files "*.xlsx"
foreach f of local files {
local fnew = substr("`f'",1,4)
!rename "`f'" "`fnew'.xlsx"
}
macro list `fnew'
But when I view the file names using the last command, I see no change in their names. Could anyone please help with this?
Thanks!
Related Posts with Renaming multiple excel files
ADF is WLS?Dear friends of STATA, I have version 13 of Stata and I wanted to ask you if the ADF method used by…
Writing memory data to word tableHello As part of my job the results I get from Stata need to put into tables in a word document to…
Pseudo R squared for a Population-averaged ModelHi Statalisters, I am a novice user in Stata. I'm working with Stata.14 and Windows 7. I'm working…
Testing if the difference between two rates is more than 5%.I need to test if the difference between male and female program coverage rates (number treated/targ…
Organizing text in a legendDear all, for a graph, I want to organize the legend as follows: symb group1: estimate (se) symb g…
Subscribe to:
Post Comments (Atom)
0 Response to Renaming multiple excel files
Post a Comment