Breezer Posted January 31, 2006 Posted January 31, 2006 How can I automate the process of changing the filename after the fact. For example, if the filename is "Data" I'd like to rename it to "01312006_Data" where the numerals represent the date. Thanks.
Wim Decorte Posted February 1, 2006 Posted February 1, 2006 If you know the full path to the original file then you can use Send Event and the command line to rename the file: Calculate this string: cmd /c ren c:folderdata.txt c:01312006_data.txt
Breezer Posted February 2, 2006 Author Posted February 2, 2006 If you know the full path to the original file then you can use Send Event and the command line to rename the file: Calculate this string: cmd /c ren c:folderdata.txt c:01312006_data.txt It seems to work only for the local drive cmd /c ren c:folderdata.txt 01312006_data.txt but doesn't work on a network drive. cmd /c ren x:mypathfolderdata.txt 01312006_data.txt What am I doing wrong?
Wim Decorte Posted February 3, 2006 Posted February 3, 2006 I'm assuming the "x" drive is properly mapped? Otherwise you can use the UNC syntax of the share: servershareName Also check the privileges on the shared folder. You may not have the necessary rights.
Breezer Posted February 6, 2006 Author Posted February 6, 2006 I checked the rights and I do have the necessary rights. However, I tried to look at the error message and it says "The syntax of the command is incorrect" cmd /k ren filesvrdeptmyPathFolderData.txt 01312006_Data.txt
Wim Decorte Posted February 7, 2006 Posted February 7, 2006 Any spaces in the path? If so you need to make sure there are quotes around it.
Breezer Posted February 7, 2006 Author Posted February 7, 2006 Any spaces in the path? If so you need to make sure there are quotes around it. You are absolutely correct. Did the above as per your instructions and like magic, it worked. Thank you greatly.
Recommended Posts
This topic is 6906 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now