Page 1 of 1

Renaming Files and Folders from another file name

PostPosted: Fri Dec 01, 2017 11:30 am
by rosscad
I'll be honest is read through a decent number of posts now and I'm getting even more confused, so I just thought I'd see if I could explain what I'm trying to do and see if it's achievable.

I send a video to a dropbox file, and then Automator opens it in VLC and automatically takes screen shots every second.
Those screen shots got to a folder and I wold like the to have the videos filename as their file name, but I've been told that isn't possible in the VLC batch process.

Is there a way to copy the file name from one video and apply it to the multiple screen shots.
I'd also then like to create a folder of those images and name the folder with that same file name.

Thank you so much, I'm sorry if this is a really obvious question.

Re: Renaming Files and Folders from another file name

PostPosted: Fri Dec 01, 2017 11:38 am
by Mr_Noodle
Can you provide a concrete example with details about where the files reside and the folder structure?

Re: Renaming Files and Folders from another file name

PostPosted: Fri Dec 01, 2017 1:10 pm
by rosscad
Mr_Noodle wrote:Can you provide a concrete example with details about where the files reside and the folder structure?


Absolutely.

In my dropbox folder on my secondary Mac I have a synced folder called "R&L"
Inside that are two folders "ScreenShotAutomator" & "ScreenShots"

Currently I send a video file to the "ScreenShotAutomator" folder and a Mac opens it in VLC. Which automatically takes a screen shot every 24 frames and saves it as a JPEG into the "ScreenShots" folder.

At the moment I have it so that when the video file is opened in VLC is moves it to the "ScreenShots" folder and marked it with a blue label. What I need to do is after that is have the JPEGS prefixed with the video files, file name.

I might be making this far more complicated than it needs to be, but the desired end result is that I can drop a video into that dropbox folder and on my secondary computer is can do all the screen-grabbing and file naming and then sync those new files to dropbox.

Re: Renaming Files and Folders from another file name

PostPosted: Mon Dec 04, 2017 11:43 am
by Mr_Noodle
How are the files named? Is there any way to correlate which video the screenshot came from?

Re: Renaming Files and Folders from another file name

PostPosted: Tue Dec 05, 2017 10:09 am
by rosscad
Mr_Noodle wrote:How are the files named? Is there any way to correlate which video the screenshot came from?


Hi thanks for replying.

All the image files come out as: ScreenShotVLC - 0001.jpeg etc

And the video file I try to rename to the most recognisable name before I enter it into this automated process.

Is there a way to do.
If a video file is dropped into a folder
Rename all images in the folder with the video file name

Thank you

Ross

Re: Renaming Files and Folders from another file name

PostPosted: Tue Dec 05, 2017 11:55 am
by Mr_Noodle
If the images and video are in the same folder and if the video is the only video in that folder, you can do something like:
Code: Select all
    If (all) are met
        Kind is Image
        If (all) are met for (any file in the same folder)
            Kind is Movie
            Name matches (• video name)

where (•video name) matches (anything). If you are not familiar with the above concepts look for "match patterns" in the help along with "nested conditions".

What that does is match an image if there is a video file in the same folder. It also captures the name of the video file into the (•video name) custom attribute which you can then use in a Rename action.

Re: Renaming Files and Folders from another file name

PostPosted: Fri Dec 08, 2017 5:47 am
by rosscad
Thank you sooooo much!

I will give that a go.

Ross