 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
TheGood
Joined: 30 Jul 2007 Posts: 514
|
Posted: Mon Jan 12, 2009 8:19 pm Post subject: uFileMan - (uTorrent) File Manager |
|
|
Download
To make sure your browser downloads the latest version, make sure you clear your cache.
The concept of this script is very simple: it allows you to queue up actions to be taken. Allow me to explain. Have you ever had to move multiple (big) folders, but because they are not in the same folder, you couldn't move them all at once, so instead had to wait for each one to finish until you could move the next one? Have you ever wanted to constantly clear out a folder or delete a certain file as soon as it exists?
Well, uFileMan allows you to do those things, and much much more. The reason why uTorrent is in parentheses is because uFileMan can also interact with uTorrent (WebUI must be turned on). Here is a list of "actions" that uFileMan can do:- File Copy
- File Delete
- File Move
- File Recycle
- File Rename
- Folder Copy
- Folder Create
- Folder Delete
- Folder Move
- Folder Recycle
- Folder Rename
- Run program
- Run program and wait
- Torrent Add
- Torrent Force Start
- Torrent Pause
- Torrent Recheck
- Torrent Remove
- Torrent Remove and Delete
- Torrent Start
- Torrent Stop
- Torrent Unpause
- Wait for file exist
- Wait for folder exist
- Wait for torrent to download
Programming uFileMan is easy. A list of actions to do is called an Action Set. You can have multiple Action Sets. uFileMan can stay in the system tray and will change icon (included in zip file) when actions are being executed. You can turn monitoring (ie. undertake enabled Action Sets) on or off by pressing F5 (if the GUI is open) or clicking Turn On/Off from the tray menu. Action Sets can be set to disable themselves if errors occur during execution, or to stay enabled even if errors occured. Individual actions can also be set to stop the whole action set if an error occurs, or the opposite. It is entirely up to you. A log file is kept in the same folder as the script (can be changed in the settings).
This picture shows an action from the action set "Delete log file" being edited.
Download
To make sure your browser downloads the latest version, make sure you clear your cache.
The coding is a little messy. I didn't intend it to end up this big in the end. I started with the idea of something that would only interact with uTorrent but soon realized that this would imply support for any file/folder operations.
Acknowledgements:Thank you all for the great code!
Feel free to comment and/or suggest improvements.
Enjoy!
Changelog
Jan 27, 2009
- Fixed a huge bug as well as a few minor bugs
Jan 28, 2009
- Added Show/Hide to the tray menu
- Fixed a lot of minor bugs
- Changed the V button behaviour for "Wait for torrent to download" action (now it only lists torrents not done downloading, as opposed to all of them)
Jan 29, 2009
- uFileMan can now use uTorrent's resume.dat file for more accurate path suggestions in V buttons
Jan 30, 2009
- Fixed window size bugs
- Added "Torrent Start All" and "Torrent Stop All"
Jan 30, 2009
- Added RegEx support for torrent names! (and removed the two previously added torrent actions)
- uTorrent configuration is now part of config.ini
Jan 31, 2009
- Cleaned up GetActionName()
- Torrent Filters now must start with a ")" to be seen as RegEx. Otherwise, they're considered the exact name of a torrent
Feb 01, 2009
- Fixed a potential memory leak when using SHAutoComplete
- Added auto-adjust to the New Action Set window
- Removed the minimize box from New Action Set window
- Made New Action Set window auto-adjust on Add and Edit
Feb 01, 2009
- Major cleanup. Script is now much more readible
- Added a few very minor features and fixed a few bugs
- The helper menus are now scanned for unnecessary seperators before showing
- Optimized a few functions
Feb 02, 2009
- Fixed bug affecting all torrent actions
Last edited by TheGood on Mon Feb 16, 2009 11:32 pm; edited 15 times in total |
|
| Back to top |
|
 |
skb
Joined: 28 Jan 2009 Posts: 7
|
Posted: Wed Jan 28, 2009 12:55 am Post subject: |
|
|
Hello.
This is really interesting, it's very close to what i'm looking for, except for a few details... i want to do the Wait-for-file-to-exist and then rename the file that was found, but i need to use wildcards in the first part since i only know part of the file name. So, the (*) wildcard seems to be working fine on the first step, but i don't see a way for the second step to to rename the file that was found in the first step... in fact, the Rename File function doesn't seem to be working at all for me (it appears as "completed succesfully" in the log but it doesn't changes the file name )...
So i would appreciate if you or someone could point me out what can i do here (and yes i just found this autohotkey thing today while looking this up ) |
|
| Back to top |
|
 |
TheGood
Joined: 30 Jul 2007 Posts: 514
|
Posted: Wed Jan 28, 2009 1:48 am Post subject: |
|
|
| skb wrote: | Hello.
This is really interesting, it's very close to what i'm looking for, except for a few details... i want to do the Wait-for-file-to-exist and then rename the file that was found, but i need to use wildcards in the first part since i only know part of the file name. So, the (*) wildcard seems to be working fine on the first step, but i don't see a way for the second step to to rename the file that was found in the first step... in fact, the Rename File function doesn't seem to be working at all for me (it appears as "completed succesfully" in the log but it doesn't changes the file name )... |
First of all, thank you for your interest!
Secondly, I made a very big (and stupid) mistake before uploading the script (which prevented most actions from working). It should now work. Please download the zip file again and overwrite the old script. Please make sure that it downloads a new copy and not the cached (old) version. To make sure, delete the cache (aka "Temporary Internet files") before downloading.
And third, as you can deduce from clicking the "H" button, each action (except the torrent ones) is really using a command of AutoHotkey. For File Rename, it uses FileMove. Therefore, anything that applies to the command, also appplies to the action in uFileMan. Think of it as the first textbox representing the first parameter of the command (SourcePattern) and the second textbox representing the second parameter of the command (DestPattern). |
|
| Back to top |
|
 |
skb
Joined: 28 Jan 2009 Posts: 7
|
Posted: Wed Jan 28, 2009 5:16 am Post subject: |
|
|
Wow it really works! it pretty much does what i'm looking for, thanks!  |
|
| Back to top |
|
 |
TheGood
Joined: 30 Jul 2007 Posts: 514
|
Posted: Thu Jan 29, 2009 1:52 am Post subject: |
|
|
| Post updated. Fixed a lot of minor bugs and added a few minor features. |
|
| Back to top |
|
 |
skb
Joined: 28 Jan 2009 Posts: 7
|
Posted: Fri Jan 30, 2009 8:10 am Post subject: |
|
|
Hey i finally got the utorrent thing working and it's great, though i have one little quirk...
I want to program actions that will apply to future torrents for which i don't know their exact name, but the actions only execute well when one puts the complete exact name of the torrent (as selected from the dropdown list), it doesn't seem to work with wildcards or partial names... So i was wondering if there could be a workaround for this ^^...
Another thing that could help would be to have a "stop all torrents" and "start all torrents" actions, what do you think?  |
|
| Back to top |
|
 |
TheGood
Joined: 30 Jul 2007 Posts: 514
|
Posted: Fri Jan 30, 2009 5:34 pm Post subject: |
|
|
| skb wrote: | I want to program actions that will apply to future torrents for which i don't know their exact name, but the actions only execute well when one puts the complete exact name of the torrent (as selected from the dropdown list), it doesn't seem to work with wildcards or partial names... So i was wondering if there could be a workaround for this ^^...
Another thing that could help would be to have a "stop all torrents" and "start all torrents" actions, what do you think?  |
Good ideas!
I will definitely implement wildcards (or probably regex) in a future release. But for now, I added the two torrent actions "Torrent Start All" and "Torrent Stop All". In the future however, when I implement wildcards/regex, I'll remove those two actions since you can just do * (or .* for regex) in Torrent Start/Stop to affect all torrents.
Let me know if you think of any other features! |
|
| Back to top |
|
 |
TheGood
Joined: 30 Jul 2007 Posts: 514
|
Posted: Fri Jan 30, 2009 9:11 pm Post subject: |
|
|
OK, I added RegEx support for torrent names in most torrent-related actions (those that permit it)!
I also made uTorrent configurations to be in the INI file instead of in the script's header. This will allow the script to be easily updated as well as compile-friendly. |
|
| Back to top |
|
 |
skb
Joined: 28 Jan 2009 Posts: 7
|
Posted: Mon Feb 02, 2009 4:31 pm Post subject: |
|
|
Hey, me again, thanks for adding regexp and the other features, it's getting better every time
I'm just having an issue with the latest version... the Stop Torrent action is not working for me now (haven't tried the others), not even in full title match or regexp mode, though it worked fine on the first version that had regexp support...
Also, you mention that torrent filters now must start with a ")" to be seen as RegEx, so i'm guessing a filter could be like this ").*partial.*name.*filextension", is that right? |
|
| Back to top |
|
 |
TheGood (guest) Guest
|
Posted: Mon Feb 02, 2009 6:33 pm Post subject: |
|
|
| skb wrote: | | I'm just having an issue with the latest version... the Stop Torrent action is not working for me now (haven't tried the others), not even in full title match or regexp mode, though it worked fine on the first version that had regexp support... |
That's weird. It definitely works for me. I'm not home right now but I'l look into it later this afternoon. What does it say in the log?
| skb wrote: | | Also, you mention that torrent filters now must start with a ")" to be seen as RegEx, so i'm guessing a filter could be like this ").*partial.*name.*filextension", is that right? |
Yes, that is correct. Although it might not be working for the same reason as your other problem.
Can you test for me if the other torrent actions work for you? |
|
| Back to top |
|
 |
TheGood
Joined: 30 Jul 2007 Posts: 514
|
Posted: Mon Feb 02, 2009 11:10 pm Post subject: |
|
|
OK, I found the error.
Should work now!
Let me know! |
|
| Back to top |
|
 |
TheGood
Joined: 30 Jul 2007 Posts: 514
|
Posted: Wed Feb 04, 2009 4:29 am Post subject: |
|
|
Did anyone else try this?
I'd like to make sure that actions are working properly on other machines. |
|
| Back to top |
|
 |
skb (guest mode) Guest
|
Posted: Wed Feb 04, 2009 6:08 pm Post subject: |
|
|
It's working fine for me, thanks!
I'll report back with bugs or ideas when i find them  |
|
| Back to top |
|
 |
headcase59 Guest
|
Posted: Thu Jun 11, 2009 5:11 am Post subject: |
|
|
Hi -- I want to do the following:
1. Download a torrent
2. Copy the downloaded files to another folder
3. Perform an action on the new folder
Is this possible with uFileMan? |
|
| Back to top |
|
 |
TheGood
Joined: 30 Jul 2007 Posts: 514
|
Posted: Sat Jun 13, 2009 5:27 am Post subject: |
|
|
| headcase59 wrote: | Hi -- I want to do the following:
1. Download a torrent
2. Copy the downloaded files to another folder
3. Perform an action on the new folder
Is this possible with uFileMan? |
It depends on what you mean. Do you want to simply set the algorithm for multiple files, or are you trying to do this for a specific torrent. If the former, no. If the latter, yes.
The problem is that you can't have a set of actions set up so that multiple actions are accomplished on each distinct torrent & its files. For example, you can stop all the torrents containing the word "linux" in it, but you can't apply actions on the downloaded files as seperate files.
What you can do however, is if, for example, you're downloading ubuntu (let's say it contains multiple files), and you want to move the files after it is done downloading, then you can create an action set just for that torrent. It would be something like (assuming the downloads folder is C:\Downloads):
- Wait for torrent "Ubuntu" to finish downloading
- Copy file(s) "C:\Downloads\ubuntu\*.*" to "C:\Other Folder\ubuntu"
And then you can add whatever action you want on the new folder.
The difference here is that you know what the folders will be named. That is why it can't be done in a more generic way so as to apply the actions to multiple torrents.
Hope this helps! |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|