Rename Files in a folder
Hi,
I have a 50 files in a folder which will contain a same name in the starting seperated by a dot and then the original filename.
How can i rename that group of files in that folder by the name after that dot in the file.
Eg:
testing.wardrope.txt
testing.bracket.txt
testing.braces.txt
Share your thoughts.
I have a 50 files in a folder which will contain a same name in the starting seperated by a dot and then the original filename.
How can i rename that group of files in that folder by the name after that dot in the file.
Eg:
testing.wardrope.txt
testing.bracket.txt
testing.braces.txt
Share your thoughts.
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
anonymous_9363
14 years ago
Use the Split function with the full-stop (period) as the separator, then use CopyFile to copy the original to the new name, followed by file deletion of the original.
Nice dodge: you can "access" the elements of the array returned by Split directly, as in:
Nice dodge: you can "access" the elements of the array returned by Split directly, as in:
strPart1 = Split(arrFilename, ".")(0)
strPart2 = Split(arrFilename, ".")(1)
and so on.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.