Last active
September 13, 2024 09:12
-
-
Save namandixit/d18a8faae44376d1dcd33c7cdff42634 to your computer and use it in GitHub Desktop.
QBittorent backup all torrent files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import libtorrent as lt | |
import sys | |
import os | |
# Location of torrent files: https://github.com/qbittorrent/qBittorrent/wiki/Frequently-Asked-Questions#Where_does_qBittorrent_save_its_settings | |
os.chdir('BT_backup') | |
dirname = '.' | |
ext = ('.torrent') | |
for tf in os.listdir(dirname): | |
if tf.endswith(ext): | |
ti = lt.torrent_info(tf) | |
print(tf, " =>> ", ti.name()) | |
# os.rename(tf, ti.name()+".torrent") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment