Home | Gallery | Forum | Services | Webmail | Archive | Links | Contact Us | About Us
OS2 World.Com Forum
OS2 World.Com Online Discussion Forum.
Index / OS/2 - General / Applications
author message
Attack of the DOTS..... and Bittorrent!
Post a new topic Reply to this Topic Printable Version of this Topic Forward this Topic to your Friend Topic Commands (for administrator or moderators only)
sXwamp
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 19
since: 29 Oct, 2004
1. Attack of the DOTS..... and Bittorrent!
Reply to this topic with quote Modify your message
Has anyone wrote a REXX script to replace the dots and remove the [ ] characters in a torrent link before it is passed to the Bitttorrent client? The [ ] character really mess things up.

Thanks,

sXwamp

Date: 23 Apr, 2006 on 02:32
Jan-Erik
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this memberhttp://www.xn--lrka-loa.com
posts: 27
since: 15 May, 2003
2. Re:Attack of the DOTS..... and Bittorrent!
Reply to this topic with quote Modify your message
/* Rename Torrent files, remove unwanted characters like [] and + */
'@echo off'

call RxLoadLib 'SysFileTree', 'SysLoadFuncs', 'RexxUtil'
call SysFileTree DIRECTORY()||'*.torrent', 'file', 'OF'
renamed = 0
do i = 1 to file.0
fname = strip( translate( file.i, '', '[]+' ) ) /* Remove characters. Adjust to your preference if nedded */
if fname \= file.i then do
Say 'Renaming "'||filespec( 'N', file.i )||'" to "'||filespec( 'N', fname )||'"'
'@rename "'||file.i||'" "'||filespec( 'N', fname )||'"'
if rc \= 0 then
say 'failed!!!'
else renamed = renamed + 1
end /* do */
end /* do */
Say renamed 'of' file.0 'files has been renamed.'
Return 0


/* load Libraries */
RxLoadLib: Procedure
If RxFuncQuery( ARG(1) ) \= 0 Then do
call RxFuncAdd ARG(2), ARG(3), ARG(2)
interpret 'If '||ARG(2)||'() \= 0 Then Return 1'
end
Return 0

---
//Jan-Erik

Date: 29 Apr, 2006 on 06:31
sXwamp
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 19
since: 29 Oct, 2004
3. Re:Attack of the DOTS..... and Bittorrent!
Reply to this topic with quote Modify your message
Thank you very much! It's going to be a little longer before I get a hold of REXX.


sXwamp

Date: 29 Apr, 2006 on 11:47
Jan-Erik
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this memberhttp://www.xn--lrka-loa.com
posts: 27
since: 15 May, 2003
4. Re:Attack of the DOTS..... and Bittorrent!
Reply to this topic with quote Modify your message
sXwamp, don't worry it'll come to you...

Note 1: I may have written the code a bit more complex than I had to.

Note 2: I've found out that the PM/GUI name may still appear to be the same as before the rename operation and contain [ ,] and +, but that's not that important.

You may find my BTWrapper @ http://www.xn--lrka-loa.com if you like ... it's completely written in rexx but use python and bittorrent to download torrents.

With kind regards
//Jan-Erik

Date: 03 May, 2006 on 08:00
Attack of the DOTS..... and Bittorrent!
Post a new topic Reply to this Topic Printable Version of this Topic Forward this Topic to your Friend Topic Commands (for administrator or moderators only)
All times are CET+1. < Prev. | P. 1 | Next >
Go to:
 

Powered by UltraBoard 2000 Standard Edition,
Copyright © UltraScripts.com, Inc. 1999-2000.
Home | Gallery | Forums | Services | Webmail | Archive | Links | Contact Us | About Us
OS2 World.Com 2000-2004