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
Load dataset from OneDrive web folderDear fellows, I am trying to load a dataset "A.dta" from my personal OneDrive folder, but I have som…
bootstrap with manualsorry. I moved my post here https://www.statalist.org/forums/for...trap-as-manual …
Consquences of demeaning an ordinal variableI have a discrete variable with a scale from 0 (no issue) - 3 (severe issue). Because what constitut…
How to test the difference of the sample mean difference?Dear all, I have return data for two types of firms from the year 2015 to 2016, I know how to test t…
Estimation of the gravity model only with GDP of the partners of a country to assess the determinants of exports of a specific countryDear All. I am working on a gravity model to evaluate the determinants of Colombian exports. To do …
Subscribe to:
Post Comments (Atom)
0 Response to Renaming multiple excel files
Post a Comment