/build/static/layout/Breadcrumb_cap_w.png

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.

0 Comments   [ + ] Show comments

Answers (1)

Posted by: anonymous_9363 14 years ago
Red Belt
0
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: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.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ