Hi all,
i have three string variables called
dirname (string containing the path of subfolder (having in mind that cd is correctly set and these paths are set ok wrt cd), for example "DOCS/folder1/folder11"),
filename (string containing the name of the file in the subfolder, with its extension, for example "Book.docx")
newfilename (string containing new name of the file, for example "Newnamebook.docx")
i want to rename all files that are in my database with a loop:
Does anybody see what is the error here because it is not working?
Thanks!
i have three string variables called
dirname (string containing the path of subfolder (having in mind that cd is correctly set and these paths are set ok wrt cd), for example "DOCS/folder1/folder11"),
filename (string containing the name of the file in the subfolder, with its extension, for example "Book.docx")
newfilename (string containing new name of the file, for example "Newnamebook.docx")
i want to rename all files that are in my database with a loop:
Code:
qui count forvalues i = 1(1)`r(N)' { levelsof filename in `i'/`i', local(filen) levelsof newfilename in `i'/`i', local(newfilen) levelsof dirname in `i'/`i', local(dirn) !rename `dirn'"/"`filen'`dirn'"/"`newfilen' }
Thanks!
Comment