Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

python/batch- getting size of torrent files

Name: gC 2005-03-27 8:51

winxp / python240

Took me like 2 hours to get through this, and since I couldn't find anything to do this with tools I already had or on the net, I made a script up.

Basically, running the batch by itself scans the dir the script&batch is in for torrent files, then for each file it reads the files and rips out the proper filesize values of the files, adds them together and prints it. The batch file does the output redirection and per file stuff. 'nix people can probably do their own version of this batch file maybe, you leet haxors you.

why do this?: I do not want (whinge) to open my bt program just to open a file and choose a place to store the contents of the torrent. and then get to see the filesize of whetever is in the torrent.
I just want to see how big it will be.

the .py file by itself can accept multiple arguments, but, you need to enclose the names in quotes, otherwise python will split up the (filenames that have spaces in them) you give it into multiple arguments you didnt want and then fuck up grandly.

edit it whatever I don't really care, since youre probably going to remove the /b references and all the other shit ha :D oh and obfuscation is great for multiple regexps

also theres a commented out part at the end to get the .py script to halt and wait for someone to press [enter], thats just to make it a blocking script if you want, that line would need to be copied to just before the other exit point of the script as well.

I think that was all hey, torrentsize.py, size.bat follows:

Name: Anonymous 2012-05-07 6:33

>>12
I still have to test my software against it because it is included in older releases of certain lunix distros with ongoing or recently expired support.  Which means that I'm restricted from using all nice things that appeared  since then.  I write Python and I still hate my job, all because of Python 2.4.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List