I am using Stata 15.1 on a Mac computer. I am trying to batch rename files using the command "renfiles" (I would also like to use the related command, "mvfiles", which is not working either, but I'm guessing the reasons are related, so let's stick with renfiles).
Here is my code:
On a side note, !rename command (having difficulty finding information on how this command works) does not work either but does issue an error. Here is the code:
Any help with this would be greatly appreciated. I just want to rename some files using Stata.
Here is my code:
renfiles , folder("/Users/Gio/Documents/Research/Data/NHTSA/FARS/DBF Files/FARSDBF99/") match("PERSON.dbf") insign("PERSON") outsign("per1999")When I run the code, I get no errors. However, when I look in the directory where the file "PERSON.dbf" is located, there are no changes. What could be causing renfiles to fail?
On a side note, !rename command (having difficulty finding information on how this command works) does not work either but does issue an error. Here is the code:
!rename "/Users/Gio/Documents/Research/Data/NHTSA/FARS/DBF Files/FARSDBF99/PERSON.dbf" "/Users/Gio/Documents/Research/Data/NHTSA/FARS/DBF Files/FARSDBF99/PER.dbf"Here is the error:
/bin/bash: rename: command not found
Any help with this would be greatly appreciated. I just want to rename some files using Stata.
Comment