Closed Aesthermortis closed 3 years ago
What is -n "%~nx1" %*
evaluated to on your system? What does the full command look like which executes py3createtorrent? (With all placeholders evaluated.)
to get the file name and extension "%~nx1"
py3createtorrent -P -q -d -2 --md5 -c "xD" -t tracker -n "%~nx1" -o "%outputdir%\%~n1[tracker name] %~n1.torrent" %*
What is the actual full command called, after the placeholders have been replaced with the variable values?
file name contains (2020) the torrent is created if I remove the parentheses
For me it works. It is probably a problem with your BAT file. It is important to know what the actual full RESOLVED commandline looks like (after placeholders have been replaced with actual values).
My test output:
C:\Users\Robert\Desktop\TorrentTest
λ pip install py3createtorrent
Collecting py3createtorrent
Using cached py3createtorrent-1.0.0b1-py3-none-any.whl (13 kB)
Collecting bencode.py
Downloading bencode.py-4.0.0-py2.py3-none-any.whl (18 kB)
Installing collected packages: bencode.py, py3createtorrent
Successfully installed bencode.py-4.0.0 py3createtorrent-1.0.0b1
C:\Users\Robert\Desktop\TorrentTest
λ py3createtorrent.exe "test(parentheses).dot"
Successfully created torrent:
Name: test(parentheses).dot
Size: 4 KiB
Pieces: 1 x 16 KiB
Comment: created with py3createtorrent v1.0.0b1
Private: no
Creation date: 2021-01-08 11:49:26
DHT bootstrap nodes: (none)
Webseeds: (none)
Primary tracker: (none)
Backup trackers:
(none)
C:\Users\Robert\Desktop\TorrentTest
λ py3createtorrent.exe "test(parentheses).dot" -o "custom-name-with-(parentheses).torrent"
Successfully created torrent:
Name: test(parentheses).dot
Size: 4 KiB
Pieces: 1 x 16 KiB
Comment: created with py3createtorrent v1.0.0b1
Private: no
Creation date: 2021-01-08 11:50:19
DHT bootstrap nodes: (none)
Webseeds: (none)
Primary tracker: (none)
Backup trackers:
(none)
C:\Users\Robert\Desktop\TorrentTest
λ ls -l
total 10
-rw-r--r-- 1 Robert 197121 226 Jan 8 11:50 'custom-name-with-(parentheses).torrent'
-rw-r--r-- 1 Robert 197121 4592 Jan 8 11:27 'test(parentheses).dot'
-rw-r--r-- 1 Robert 197121 226 Jan 8 11:49 'test(parentheses).dot.torrent'
py3createtorrent.py: error: Invalid name: 'camila (2020).aac'. Allowed chars: AZ, a-z, 0-9, any of {.,-} plus spaces.
Ok, I got it. Will be fixed soon.
Fixed in 1.0.0b2. Please upgrade with pip install --upgrade py3createtorrent
I am trying to get the program to use the name of the file as the name it will show in the torrent but the torrent is not created. using a bat file
the torrent is not created if the name contains parentheses
-n "%~nx1" %*