|
Joined: Nov 2003
Posts: 101
Vogon poet
|
OP
Vogon poet
Joined: Nov 2003
Posts: 101 |
Hi, I'm hoping to write something that alert me for any new files/folders uploaded by someone onto my dropbox. I plan to run this timer every 5 mins on mIRC startup alias FDD {
var %FDpath C:\Users\colt\Dropbox
echo @NEW New Directory(s) Detected : $finddir(%FDpath,*.*,0,0,echo $1-)
echo @NEW New File(s) Detected : $findfile(%FDpath,*.*,0,0,echo $1-)
} The result isn't how I was hoping for, all I see the output was C:\Users\colt\Dropbox\Test
C:\Users\colt\Dropbox\test1.txt
C:\Users\colt\Dropbox\test2.txt
C:\Users\colt\Dropbox\test3.txt but what I see in @NEW New Directory(s) Detected : 1
New File(s) Detected : 3 How can I get this to display them into @NEW window? So that it would show like this ... New Directory Detected : C:\Users\colt\Dropbox\Test
New File(s) Detected : C:\Users\colt\Dropbox\test1.txt
New File(s) Detected : C:\Users\colt\Dropbox\test2.txt
New File(s) Detected : C:\Users\colt\Dropbox\test3.txt Hope someone can help me, Thanks
|
|
|
|
Joined: Oct 2005
Posts: 34
Ameglian cow
|
Ameglian cow
Joined: Oct 2005
Posts: 34 |
Hi, you can try this out which may serve your purpose alias FDD { var %FDpath C:\Users\colt\Dropbox /window @NEW | echo @NEW New Directory(s) Detected : $finddir(%FDpath,*.*,0,) /window @NEW | echo @NEW New File(s) Detected : $findfile(%FDpath,*,0,1) } Thanks
|
|
|
|
Joined: Jan 2004
Posts: 2,081
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,081 |
You've got 2 echoes going on, you're sending the count of matching folders to @new but the echo of the individual matches are going to the status window. If you want both to go to @new, then you need to send both echoes there. If you only want the matches going there, then do something like
//noop $finddir(%fdpath,*,0,1,echo @NEW New Directory(s) Detected : $1-)
Note that the depth of 0 you used behaves like depth of 1, so you're not seeing subdirs unless you either change depth to something big like 99 or just drop that 4th parm. Also note that if you're trying to copy/move folders or filenames someone creates having doublespaces would require special handling, such as addressing them using $shortfn.
|
|
|
|
Joined: Nov 2003
Posts: 101
Vogon poet
|
OP
Vogon poet
Joined: Nov 2003
Posts: 101 |
Hi, you can try this out which may serve your purpose alias FDD { var %FDpath C:\Users\colt\Dropbox /window @NEW | echo @NEW New Directory(s) Detected : $finddir(%FDpath,*.*,0,) /window @NEW | echo @NEW New File(s) Detected : $findfile(%FDpath,*,0,1) } Thanks Thanks for getting back to me, however - it's not how I want to see .. I see this when I ran that. New Directory(s) Detected : 1
New File(s) Detected : 3 and nothing else, I just want to display the new filename and new directory .. not numbers  Preferably want to announce into a channel where I and my other friend can view of any new items coming in.
|
|
|
|
Joined: Nov 2003
Posts: 101
Vogon poet
|
OP
Vogon poet
Joined: Nov 2003
Posts: 101 |
You've got 2 echoes going on, you're sending the count of matching folders to @new but the echo of the individual matches are going to the status window. If you want both to go to @new, then you need to send both echoes there. If you only want the matches going there, then do something like
//noop $finddir(%fdpath,*,0,1,echo @NEW New Directory(s) Detected : $1-)
Note that the depth of 0 you used behaves like depth of 1, so you're not seeing subdirs unless you either change depth to something big like 99 or just drop that 4th parm. Also note that if you're trying to copy/move folders or filenames someone creates having doublespaces would require special handling, such as addressing them using $shortfn. That's the one!  Works, now time for me to improvise! Thanks 
|
|
|
|
|