qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

Remove subfolder from existing torrents

Open sallymanda opened this issue 6 years ago • 7 comments
trafficstars

Please provide the following information

qBittorrent version and Operating System

4.1.5 Win10 64bit

What is the problem

Requesting an option to remove the subfolder for a torrent, currently removing and opening the torrent after manually changing file subfolder in windows explorer is the only method to do so.

sallymanda avatar Jan 30 '19 22:01 sallymanda

Isn't there such an option?

glassez avatar Jan 31 '19 05:01 glassez

Unless I'm mistaken... but probably wasn't clear enough. I refer to an option to disable subfolders in an existing torrent, one that has already been downloaded for example. The operation would relocate the torrent data accordingly and delete the existing subfolder. This is as opposed to the existing option to disable the default create subfolder tickbox via preferences...

sallymanda avatar Jan 31 '19 06:01 sallymanda

Yes, you can remove torrent root folder only when you adding it.

glassez avatar Feb 01 '19 04:02 glassez

Yeah, so he's asking for an option to do this for an existing torrent as well. I second this, as I have also had need for this in the past, and this lack of ability currently makes the "Set location..." relocation feature incomplete, as you can't always precisely control the actual location of your downloaded files as you wish, as basic an ability as that is. The "hardcoded" parent folder is quite a clumsy affair, as is the workaround in this case of removing and re-adding the torrent to the client, which also loses all its stats.

Vagmer avatar Feb 04 '19 12:02 Vagmer

Have needed this often, would very much like to see it implemented. A simple right click and 'remove folder' option. The benefit being single file torrents can be easily seeded while also seeding a full pack torrent with a minimum of fuss.

Ryrynz avatar Aug 22 '21 00:08 Ryrynz

I would like to update my original feature suggestion: I think that the torrent options window that can be opened via the right clicking an existing torrent would likely be a good place for adding or removing the subfolder after a torrent has already been added.

sallymanda avatar Nov 27 '23 23:11 sallymanda

I have found that renaming the subfolder to . in the Content tab functions as a workaround, and will move files to the parent directory and remove the subfolder. Similarly, renaming a file to subfolder/filename.ext will move it to a new subfolder.

AmazingSlab avatar Aug 24 '24 18:08 AmazingSlab

I have found that renaming the subfolder to . in the Content tab functions as a workaround, and will move files to the parent directory and remove the subfolder. Similarly, renaming a file to subfolder/filename.ext will move it to a new subfolder.

This is honestly a good enough feature, even if not intended. I would be fine with this, instead of a whole new option during rename, but sucks it's not an obvious solution to anyone not googling around.

ThatProgrammerr avatar Oct 27 '24 18:10 ThatProgrammerr

Not a bad work around, does it work for windows users as well? I'm on linux myself, so not personally relevant.

Thinking about it again, perhaps the most straightforward approach to adding this functionality would be to just add it to the existing Torrent options... option in the torrent right click menu, as a drop-down box just like it appears in the add-new-torrent dialogue.

sallymanda avatar Oct 27 '24 21:10 sallymanda

Can confirm it works for Windows, at least via the Web UI. I can't speak for the actual windows client itself.

ThatProgrammerr avatar Oct 27 '24 21:10 ThatProgrammerr

ANNOUNCEMENT!

For anybody coming across this "Feature Request" & would like/love to see a potential implementation in the future! Here are some options available to you:

  1. Please select/click the 👍 &/orreactions in the original/opening post of this ticket.

  2. Please feel free (If you have the "skillset") to create a "Pull Request" implementing what's being requested in this ticket. (new/existing contributors/developers are always welcome)


DO:

  • Provide constructive feedback.
  • Display how other projects implemented same/similar etc.

DO NOT:

  • Add a "Bump", "me too", "2nd/3rd" etc. or "criticizing" comment(s). (These will be disregarded/hidden as "spam/abuse/off-topic" etc. as they don't provide anything constructive.)

xavier2k6 avatar May 23 '25 22:05 xavier2k6

Probably, the most logical place for this setting would be in the existing "Torrent Options" somewhere next to existing "Category" because both of these settings can move downloaded files.

vrubleg avatar Nov 16 '25 15:11 vrubleg

I have found that renaming the subfolder to . in the Content tab functions as a workaround, and will move files to the parent directory and remove the subfolder. Similarly, renaming a file to subfolder/filename.ext will move it to a new subfolder.

Additional workaround: Renaming a file to ../filename.ext will move it up one level out of its current folder. This is useful when you need to move individual files out of a subfolder without renaming the entire folder structure.

piknockyou avatar Nov 16 '25 18:11 piknockyou

I have found that renaming the subfolder to . in the Content tab functions as a workaround, and will move files to the parent directory and remove the subfolder. Similarly, renaming a file to subfolder/filename.ext will move it to a new subfolder.

Additional workaround: Renaming a file to ../filename.ext will move it up one level out of its current folder. This is useful when you need to move individual files out of a subfolder without renaming the entire folder structure.

Renaming files/folders to . .. ../filename.txt will have no effect after 5.2

https://github.com/qbittorrent/qBittorrent/pull/23060

cocopaw avatar Nov 16 '25 22:11 cocopaw

But isn't this a nice feature to keep? For example, Total Commander automatically creates all subfolders if you rename a file into a/b/c/filename.ext. If there is no UI for moving files around, it could be supported this way (by fixing issues it currently causes because this behavior was unintended).

vrubleg avatar Nov 17 '25 05:11 vrubleg

its a bug not a feature? ;-)

v4u6h4n avatar Nov 17 '25 05:11 v4u6h4n

Renaming files/folders to . .. ../filename.txt will have no effect after 5.2

Does this mean the GUI workarounds for restructuring files and folders within torrents have been removed? If so, what are the recommended alternative workflows for reorganizing torrent content structure?

piknockyou avatar Nov 17 '25 06:11 piknockyou

Renaming files/folders to . .. ../filename.txt will have no effect after 5.2

Does this mean the GUI workarounds for restructuring files and folders within torrents have been removed?

  • Correct. If you read #23060 in detail it is explained why.

If so, what are the recommended alternative workflows for reorganizing torrent content structure?

  • It's currently unsupported via the GUI but You could use API function renameFile and script where necessary.

I may add add/remove folder and drag/drop files between folders in the GUI at some stage depending on interest.

cocopaw avatar Nov 18 '25 04:11 cocopaw