![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Absolute Beginner Talk The perfect starting place to find out more about computers, Linux and Ubuntu. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
5 Cups of Ubuntu
![]() Join Date: Dec 2006
Beans: 31
Ubuntu 6.10 Edgy
|
looking for a 'magic folder' app... need some help
i'm lookin for an application that would reside on the desktop maybe in a taskbar or launch bar or something. but when you drag a certain file and release it on this app it will automatically send it to a folder of your choice.. aka a picture you downloaded that is saved onto the desktop from the web gets sent to a picture folder, music to a music folder, etc etc etc etc.. i know vista has something like this. it's called magic folder or something. i was curious if anyone knew of anything like this for linux. feel free to post with some links of your suggestions. thanks alot.
|
|
|
|
|
|
#2 |
|
Dark Roasted Ubuntu
![]() Join Date: Nov 2006
Location: There and back again
Beans: 1,039
|
Re: looking for a 'magic folder' app... need some help
I definitely like the idea! If you want to learn basic programming you should learn to write a script for this. It should be that difficult. Just would have to specify file endings ".end" and a simple line to mv them to the folder required.
__________________
|
|
|
|
|
|
#3 |
|
5 Cups of Ubuntu
![]() Join Date: Dec 2006
Beans: 31
Ubuntu 6.10 Edgy
|
Re: looking for a 'magic folder' app... need some help
i messed with vb during a quarter at itt... and i dont really recall much of it. is this something that could be done with python? if it's nothing too difficult i may tinker around with it. anyone else?
|
|
|
|
|
|
#4 |
|
Quad Shot of Ubuntu
![]() |
Re: looking for a 'magic folder' app... need some help
the title "magic folder" caught my attention right away.
I haven't heard of anything like it before, but it sounds neat. It doesent sound that hard to make. a script sounds like it might work, but I am not a programmer either. good luck, -keen101 |
|
|
|
|
|
#5 |
|
Gee! These Aren't Roasted!
![]() Join Date: Jul 2007
Beans: 155
|
Re: looking for a 'magic folder' app... need some help
Can't you just make a shortcut to the folder and drag it there? Why do you need a program to drag-and-drop files?
|
|
|
|
|
|
#6 |
|
5 Cups of Ubuntu
![]() Join Date: Jul 2007
Location: Western Australia
Beans: 29
Ubuntu 6.06 Dapper
|
Re: looking for a 'magic folder' app... need some help
I thought the idea was pretty cool so I hacked up a shell script that can work on the desktop.
just cut and paste the following into a text file Code:
#!/bin/bash
while [ $# -ge 1 ];
do
case $1 in
*.mp3)
mv $1 ~/Desktop/Music
;;
*.jpg | *.gif)
mv $1 ~/Desktop/Pictures
;;
*.doc | *.txt)
mv $1 ~/Desktop/Documents
;;
*)
exit 0
;;
esac
shift
done
Code:
chmod +x (name of file) At this stage i cant get it working on a taskbar or anything. you need to change the directories for the filetypes to where you want then and can easily extend the script for other file types by extending the case statement. alternatively you could make it a cron job that runs every couple of minutes to clean up the desktop. |
|
|
|
|
|
#7 |
|
Dark Roasted Ubuntu
![]() Join Date: Nov 2006
Location: There and back again
Beans: 1,039
|
Re: looking for a 'magic folder' app... need some help
Nice very well reasoned out. I'm not sure you'd need more than that, thats perfectly resonable.
__________________
|
|
|
|
|
|
#8 |
|
5 Cups of Ubuntu
![]() Join Date: Dec 2006
Beans: 31
Ubuntu 6.10 Edgy
|
Re: looking for a 'magic folder' app... need some help
pretty nice, i appreciate the help guys/gals. i'll give this a whirl and see what all i can do with it. once again.. thanks!
|
|
|
|
|
|
#9 |
|
5 Cups of Ubuntu
![]() Join Date: Dec 2006
Beans: 31
Ubuntu 6.10 Edgy
|
Re: looking for a 'magic folder' app... need some help
seems as if there is a space in the file name it doesn't put it into a folder... i thought that '*' pretty much covered that. how can you you get this script to recognize a space so it will continue to the files extention? many thanks!
|
|
|
|
|
|
#10 |
|
5 Cups of Ubuntu
![]() Join Date: Jul 2007
Location: Western Australia
Beans: 29
Ubuntu 6.06 Dapper
|
Re: looking for a 'magic folder' app... need some help
I dont know how i missed it ... its one of the main rules in shell scripting 101
to make it work with files with spaces just put " around every instance of $1. i cant seem to find a simple way to make it case insensitive but you could modify it as follows. Code:
case "$1" in
*.[mM][pP]3)
mv "$1" ~/Desktop/Music
;;
if anyone has a simple way to make it case insensitive I would love to know about it. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|