qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

Bulk renaming with find and replace

Open andrei-toterman opened this issue 8 years ago • 7 comments
trafficstars

I really like the fact that you can rename the files and folders before you download them, but it would be so much useful if this thing could be done to multiple files at once. For example, I download quite a lot of TV shows in batches, and all of the files in the batch have extra information in their names, like video resolution, subtitle provider etc. and having to remove all of those manually for an entire season is quite annoying, and I'm pretty sure I am not the only one with the problem. But a "find & replace" thing could solve this issue. Just type in what you want to find in a text box and with what to replace it in another one. For example, Deluge has a plug-in for this and it's nice, but overall I like qBittorrent more, so I keep changing my mind over which one to use. You could also include thing like placeholders. For example, a placeholder for the parent folder's name, so you could name each file after that, and one for incrementing numbers, so you could add the episode name at each file etc.

I hope you will consider this thing. Thank you very much :)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

andrei-toterman avatar Jun 14 '17 14:06 andrei-toterman

qBT already uses Boost Libs, Boost::RegEx might be a good solution here?

jungletek avatar Jun 27 '17 11:06 jungletek

IMO a solution that is easier to code and more powerful, is to do as vidir. Print the torrent's list of file names to a temporary file, and open that file in the default text editor. Then, the user can make whatever changes they want to the file names, and when they save and exit, propagate those changes to qbittorrent's file roster for that torrent. If the user has a text editor capable of find/replace, then this method will work for OP's use case.

Alternatively:
An action to scan the folder containing the torrent's files for filename changes, and propagate those changes to qbittorrent's file roster would work just as well.

FlyingWombat avatar Jul 15 '19 03:07 FlyingWombat

And I like the ability to chose my own text-editor. good idea @FlyingWombat

neolectron avatar Sep 09 '19 06:09 neolectron

I made a video about it: https://www.youtube.com/watch?v=449BCf8mk18

Note: you can't change the name of the file directly in the .torrent file, as far I'm aware of. Doing it to .fastresume looks like a useful feature. Depending on the number of files, is a lot faster than manually one by one renaming.

note2: .fastresume name = hash

note3: If there is no mapped files, just change the name of the root folder (inside qbit), it will map the files

Any questions or suggestions, just reply. cya

Ascentw avatar Mar 07 '20 05:03 Ascentw

This would be amazingly useful for me, personally. My NAS (WD MyCloud) processes incoming media files to create thumbnails, and it identifies them by extension; I'd love a way to select all the images in a torrent and quickly add another extension to them (file.jpg -> file.jpg.noprocess). Yes, this is not a problem with qbittorrent, but it would solve my issue.

An action to scan the folder containing the torrent's files for filename changes, and propagate those changes to qbittorrent's file roster would work just as well.

I like this idea.

Efreak avatar Mar 28 '20 09:03 Efreak

IMO a solution that is easier to code and more powerful, is to do as vidir. Print the torrent's list of file names to a temporary file, and open that file in the default text editor. Then, the user can make whatever changes they want to the file names, and when they save and exit, propagate those changes to qbittorrent's file roster for that torrent. If the user has a text editor capable of find/replace, then this method will work for OP's use case.

I like this idea

theKAKAN avatar May 10 '21 12:05 theKAKAN

I started working on this feature but only for the WebUI: #16239

loligans avatar Dec 09 '22 08:12 loligans

Why did you choose this implementation over what was suggested in https://github.com/qbittorrent/qBittorrent/issues/6961#issuecomment-511263650? IMO that one is more versatile.

github-account1111 avatar Dec 19 '22 23:12 github-account1111

primarily because I wanted a way to do this in the browser and have the changes be visible in real-time before actually committing to the bulk rename. additionally I am not very familiar with vi and I think the solution path I chose will be more intuitive to end users who don't have vi experience

loligans avatar Dec 20 '22 02:12 loligans

Despite the name of the script, vidir does not actually require usage of vi. It just creates a temporary file with a list of filenames, opens it in whatever text editor you want. There's no reason at all that the feature couldn't be easy for anyone to use, whether you're a tech-illiterate Windows user who only knows how to use notepad or a Linux power user using some obscure text editor nobody's ever heard of. Especially as it would, I assume, be a bespoke implementation and not actually be built on top of vidir.

BanchouBoo avatar Dec 20 '22 03:12 BanchouBoo

seems like this would make a good candidate for a truly headless qbittorrent instance i.e. no web interface

loligans avatar Dec 20 '22 07:12 loligans

Any reason why multi-file renaming was only added to WebUI?

brian6932 avatar Mar 17 '24 04:03 brian6932

Any reason why multi-file renaming was only added to WebUI?

No one has provided such functionality (in an acceptable form) for a desktop application.

glassez avatar Mar 17 '24 05:03 glassez