Add files to rename via list of folder pathnames?

Support for macOS users
Post Reply
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Add files to rename via list of folder pathnames?

Post by cheaters »

I have a .txt file with pathnames for folders that contain movie files and subtitle files.

I would like to mimic the process of adding the folders to filebot by dragging to the Rename window,, but use a text list of pathnames instead (the list contains a subset of files I need to edit).

When I choose the file it adds the folder but not the contents of the folder. Is there a way to add the contents of the folder using a .txt file that just has the folder path.

Content of .txt file is formatted like this:

Code: Select all

/Volumes/PlexMedia/PlexServer_1/Movies/Baby Driver (2017)
/Volumes/PlexMedia/PlexServer_1/Movies/Babyteeth (2020)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Add files to rename via list of folder pathnames?

Post by rednoah »

If you drop a text file into New Names, then FileBot will simply fill in the proposed file paths line by line.

If you're dropping in a list of folder names into New Names, and want the items in Original Files to line up, then you'll want to add folders line by line (i.e. use Link Drop) there as well, instead of having FileBot expand each folder into a list of files as is default. If Original Files contains Folder items, then the Rename / Move operations will apply directly on those folders.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: Add files to rename via list of folder pathnames?

Post by cheaters »

I have a list of folders in a text document. I want to get the contents of those folders (via the pathnames in the text document) to appear in the the Rename panel so I can take action on those items. When I add them by this document I don't get the contents of the folders but just the folder as "folder". I know how to manually drag a folder into the Rename panel where it adds the contents of the folder. The issue being it's too laborious to manually select each of these 500 folders out of a folder with 3000 items.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Add files to rename via list of folder pathnames?

Post by rednoah »

Are we talking about dragging text files into Original Files or New Names? I was assuming the latter.


If you want to pre-load input into Original Files on startup, then you could launch filebot via the command-line like so:

Code: Select all

filebot @/path/to/args.txt
The args.txt is going to be a list of command-line arguments. If it's just a list of file paths, then that will be the initial input. If there's no other command-line options, then FileBot will launch into the UI by default.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: Add files to Rename via text list containing paths to their folders?

Post by cheaters »

:D Perfect, that is exactly what I needed.
Truly amazing.... thank you!

These are existing files that I want to rename and the paths in the txt document are to their enclosing folder.

folder structure:
/Volumes/PlexMedia/PlexServer_1/Movies/Baby Driver (2017)/files_here

paths in txt document:
/Volumes/PlexMedia/PlexServer_1/Movies/Baby Driver (2017)

This is a list of duplicates. I need to keep the x265 movie file and deleted the x264 movie file and it's subtitles. Deleting the subtitles is a bit tricky. Have to determine which belong to the x265 and which belong to the x264.

I see there is a duplicates function:

Code: Select all

filebot -script fn:duplicates 
:?: But it keeps selecting the largest file and I am not sure how to tell it to pick the HEVC (or x265) file without renaming the files first. If I am going to rename the movie files I need to rename all the files in the folder.

:?: I added $crc32 to the filenames while renaming and was a bit surprised that the checksum is the same for multiple files in each folder, movie files and subtitle files having the same checksum. Does that sound right?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Add files to rename via list of folder pathnames?

Post by rednoah »

1.
The duplicates script will pick the best file. But "best file" is currently primarily defined by resolution and bitrate, which
might not work well in your particularly case.


2.
{crc32} much like {vc} is based on the primary video file. In the case of video files, that'll be the file itself, but for subtitle files it'll be the matching video file.



EDIT:

FileBot r8025 improves support for loading file and directory paths via text files.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: Add files to rename via list of folder pathnames?

Post by cheaters »

Thanks. I did install the current beta version (4.9.2) beforehand

Code: Select all

$ filebot -version
FileBot 4.9.2 (r8023) / OpenJDK Runtime Environment 14.0.2 / Mac OS X 10.14.6 (x86_64)
:?: Can you explain why when I called filebot @/path/to/file from the command line, and it launched, the GUI background was white and not dark themed. When clicking on the filebot app package (4.9.2) filebot has a dark themed GUI.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Add files to rename via list of folder pathnames?

Post by rednoah »

On macOS you get an app launcher for the GUI, and a shell script that launches the CLI, and those are completely different. If you launch the GUI via the CLI launcher, then you won't get macOS Desktop integration.


On macOS, if you want to launch a GUI application from the command-line and pass arguments along, then it works like so:

Code: Select all

open -a FileBot --args /path/to/files
:idea: Please read the FAQ and How to Request Help.
Post Reply