I want to rename a batch of folders based on the name of a file within each folder. The file names within each folder all follow a pattern as such:
sky897RTY_209746001.jpg
sky897RTY_209746002.jpg
sky897RTY_209746003.jpg
sky897RTY_209746004.jpg
And so on....
I wish to rename the parent folder as such:
sky897RTY_209746
Basically, I want the last three characters of the "001" file removed and then rename the parent folder with it. All of the folders follow this pattern.
This is probably pretty easy, but I don't have much experience with JavaScript. Thanks!