#1 : 23/04-25 00:24 Fred Olsen
Posts: 4
|
I have a bunch of custom videos that need to be subtitled. Each video is in its own folder. I have created a workflow to generate subtitles (SRTs) for these videos.
GOAL Once a subtitle has been generated for a video, I want its folder to be moved to my video library. That is: VIDEO123 folder -----> MY_VIDEO_LIBRARY folder |__VIDEO123.mp4 |__VIDEO123.srt Does anyone know of a way to do this with Advanced Renamer? Thanks in advance, Fred |
#2 : 23/04-25 04:47 Delta Foxtrot
Posts: 465
|
Reply to #1:
Hi Fred, I'm not sure I understand what you want to do. If you know which folders have subtitle files, wouldn't it be easier just to drag and drop those folders into your video library folder? At any rate, it's easy to use the MOVE batch mode by just dragging the appropriate folders into ARen and setting the move mode output folder to, for instance, "c:\MY_VIDEO_LIBRARY". If you are saying that you want the program to grind through all your video folders and move the folders that have both a video file and a .srt file, it can't EXACTLY do that, because if you load the folders, you don't really have access to the files to check which match the specification. And if you load the files, you don't have control over moving the folders that match the specification. What you *can* do is drag the folders in and tell ARen to load the files in the folders. Then, the following script (based on VERY limited testing!) should check for matching file pairs and create a new folder in your library that matches the video name and move the file pairs to THAT directory. You'll end up with empty directories in the original folder, but with a good file manager that can show you empty directories that's an easy problem to fix. Remember, I only tested a few files (3 vids, 2 srt files) and can't guarantee that it will work in every case; work on copies until you are comfortable that it does what you want. Anyway, here's the script, with a couple of caveats: EDIT: The files have to be sorted in filename order, so .srt files follow their videos. END EDIT 1. This won't run on version 3.x ARen ("<Media Type>" doesn't work), only version 4 (I tested on v4.11). 2. You'll have to change the "libPath" variable to the path to your video library; just be sure to keep double backslashes between the drive-folder-subfolder structure like I've done below (see asterisks). 3. You need to drag the FOLDERS into ARen that you want it to check, but tell it to load the FILES in those folders. I guess you can use the folder window, but I never do so I don't even know for sure. 4. Be sure to save the script method so you don't have to load/modify more than once. // --------- PRE-BATCH --------- // // *********************************************************************************** // // ****** CHANGE THE FOLLOWING VARIABLE TO MATCH YOUR LIBRARY ***** // libPath = "J:\\FORUM\\MY_VIDEO_LIBRARY\\" // ********************************************************************************** // // ********************************************************************************** // sendNext = false ; itemCount = app.itemCount ; // -------------------------------- // // ----------------------------------- MAIN SCRIPT --------------------------- // curName = app.currentItem.name ; curExt = app.currentItem.ext ; if ( index != itemCount - 1 ) { nextName = app.getItem( index + 1 ).name ; nextExt = app.getItem( index + 1 ).ext ; } else { nextName = "" ; nextExt = "" ; } if ( sendNext ) { item.newPath = libPath + curName ; sendNext = false ; return curName ; } if ( curName == nextName && app.parseTags( '<mediaType>' ) == "video" ) { sendNext = true ; item.newPath = libPath + curName ; return curName ; } //-----------------------------------------------------// Let me know if this isn't what you had in mind. Best, DF |