Rename a file based on it's parent folder's name

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Let's say I have one master folder that I'm watching called /temp. Within temp, I have a growing number of subfolders. Let's call them:

/temp/folder1
/temp/folder2
/temp/folder3

In any of the folders there could be a .jpeg or a .png. I want to rename that .jpeg or .png to include its parent folder's name and not the /temp folder name.

Thoughts?
idovermani
 
Posts: 1
Joined: Fri May 20, 2016 10:57 pm

Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron