How to define RELATIVE directory paths for download/save directory?

Windows specific questions, problems.
Post Reply
pstein

How to define RELATIVE directory paths for download/save directory?

Post by pstein »

I installed qBittorrent on an external hard disk which is connected by USB to my current computer and got the drive letter H:

Currently I specfied  absolute directory pathes for

Options-->Downloads--->Default Save path=H:\torr\qbit\incompletefiles\
Options-->Downloads--->keep incomplete torrents in=H:\torr\qbit\incompletetorr\
Options-->Downloads--->Copy .torrent files for finished downloads in=H:\torr\qbit\downloadedtorr\

Occasionally I connect the mentioned external USB hard disk to other computers like my notebook.
So it could happen that another drive letter is assigned to it.

The disadvantage is that the directories specified as above become invalid.

What I need is a way to specify RELATIVE directory paths starting from the qbittorrent installation directory
(similar to unix style) e.g.(mind the leading dot!):

Options-->Downloads--->Default Save path=.\incompletefiles\

The way with the leading dot seems not to work.

Is there another way (e.g. by entering a variable like %QBITINSTALLDIR%\incompletefiles\)

Or can this be implemented in the next release?

Thank you
Peter
gaydatepse

Re: How to define RELATIVE directory paths for download/save directory?

Post by gaydatepse »

I'd like to use a variable for replacing "<QBT Path>" from the following lines, which represents the "QBitTorrent.EXE" current path in the "QBitTorrent.INI" settings file:

Downloads\SavePath=<QBT Path>/Path/
Downloads\TempPath=<QBT Path>/Path/
FileLogger\Path=<QBT Path>/Path/

I already tried the following, with bad results:

Downloads\SavePath=Path/
Downloads\SavePath=/Path/
Downloads\SavePath=./Path/
Downloads\SavePath=.././Path/

Thanks everyone
unseen19
Veteran
Veteran
Posts: 188
Joined: Mon Mar 15, 2021 1:36 pm

Re: How to define RELATIVE directory paths for download/save directory?

Post by unseen19 »

not sure this is possible however your drive letter issue is common. This happens because you use multiple USB drive and the H: is not available when you reconnect the USB disk. So it is persistent except if not available when the drive is reconnected. I simplify it a bit too much but try to connect your drive and change the drive letter in the the disk manager. Let's say you assign the W: letter to it and reflect this change in QBT

Does it improve the behavior?
User avatar
Peter
Administrator
Administrator
Posts: 2693
Joined: Wed Jul 07, 2010 6:14 pm

Re: How to define RELATIVE directory paths for download/save directory?

Post by Peter »

You could write a simple .BAT file in the same folder as the .exe that'd replace the path in the ini files to the current drive letter.
Post Reply