Page 1 of 1
Delete files but let empty directonies !
Posted: Thu Jul 25, 2024 8:05 am
by vincen
Hi
I'm using qBittorrent 4.5.2 on Linux Debian 12.
Everything works very well out of a little detail. When I decide to remove a torrent in the web GUI and select also to delete files it deletes all files regarding that torrent but not the directory itself which is quite annoying. Any ideas why ?
Thanks
Vincèn
Re: Delete files but let empty directonies !
Posted: Mon Jul 29, 2024 11:53 pm
by Peter
Permission issues I'd say/think?
Re: Delete files but let empty directonies !
Posted: Tue Jul 30, 2024 9:38 am
by vincen
Peter wrote:
> Permission issues I'd say/think?
Would have been the easy solution but it's not as qBittorrent runs as same user as directory where torrents are stored so there should not be any problem of rights

Re: Delete files but let empty directonies !
Posted: Tue Jul 30, 2024 11:09 am
by Peter
Anything in the log then? It's called "Execution Log" in qBittorrent.
Re: Delete files but let empty directonies !
Posted: Tue Jul 30, 2024 11:32 am
by vincen
Peter wrote:
> Anything in the log then? It's called "Execution Log" in
> qBittorrent.
I'll have to investigate as it doesn't log in the syslog and I struggle to find qBittorrent settings life itself also

Used the Swizzin system to install the seedbox but it lacks quite some documentation on how it setups everything

Re: Delete files but let empty directonies !
Posted: Tue Jul 30, 2024 6:03 pm
by Peter
Why not just run qbittorrent-nox-static?
Re: Delete files but let empty directonies !
Posted: Sat Aug 24, 2024 1:12 pm
by vincen
Peter wrote: Tue Jul 30, 2024 6:03 pm
Why not just run qbittorrent-nox-static?
what's the difference ? with qbittorrent-static ?
Re: Delete files but let empty directonies !
Posted: Wed Sep 25, 2024 7:54 pm
by ticedoff8
In my Windows system, that's a symptom of a rogue file being created in the directory before the torrent finished downloading (or deleted) or the folder is still open in another app (like File Explorer or a CMD window) and locked.
The torrent content may get moved or deleted, but the temp torrent folder gets left behind because it's locked or there is a rogue file left.
If you are using a NAS for the /download directory, you may want to check to see if the NAS export has oplock enabled for the export or if there is another application (like a Windows PC) that may have the folders open.
Also look for .files. They will not show up with a simple 'ls' command. But do a 'ls -la' and there may see a .file.
Picasa was notorious for scanning new folders and leaving a .picasa file in each folder.
Re: Delete files but let empty directonies !
Posted: Mon Dec 23, 2024 1:28 pm
by AnLuoRidge
I have the same problem. The logs say
Code: Select all
Removed torrent but failed to delete its content and/or partfile. Error: "Directory not empty"
Upon checking
- There's no hidden files before or after the deletion.
- I haven't added any additional files into the folder.
- All the files in the torrent is 100% downloaded.
- I never opened this folder in OS.
- I opt in.!qB as the extension name of incomplete files but by the time I deleted the torrent there're not .!qB files
qBittorrent version 4.6.2, running inside docker container on DSM 7.2
btw I found a similar
discussion on GitHub.
UPDATE 2024-12-23
I finally found these’s a hidden @eaDir in the folder. It’s not visible in macOS (even tho I revealed all the hidden files) because DSM hides it from SMB/AFP connection.
UPDATE 2024-12-24
I found
qbit_manage can delete these orphaned directories automatically.
Code: Select all
orphaned:
# Orphaned files are those in the root_dir download directory that are not referenced by any active torrents.
# Will automatically remove all files and folders in orphaned data after x days. (Checks every script run)
# If this variable is not defined it, the orphaned data will never be emptied.
# WARNING: Setting this variable to 0 will delete all files immediately upon script run!
empty_after_x_days: 60
# File patterns that will not be considered orphaned files. Handy for generated files that aren't part of the torrent but belong with the torrent's files
exclude_patterns:
- "**/.DS_Store"
- "**/Thumbs.db"
- "**/@eaDir"
- "/data/torrents/temp/**"
- "**/*.!qB"
- "**/*_unpackerred"