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
Average calculation issuesHi there, I would like to calculate the average account receivable using netaccountsreceivable and …
Expression builder dialogIs there any way to make the expression builder dialog larger? The lists are too small to be usable …
Sample size estimation for comparison of three proportions: Control, Treatment1 and Treatment2Dear StataList, How can I calculate the sample size requirements for proportions in 3 (three) groups…
How to display the P value of the mediation with khb command?Hi all, Recently I read a paper published in JAMA Pediatrics(doi:10.1001/jamapediatrics.2019.1212),…
Random Effect Autocorrelation TestDear Good People, I am currently shifting to using Random Effect for my data and I would like to kn…
Subscribe to:
Post Comments (Atom)
0 Response to Renaming multiple excel files
Post a Comment