AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Crazy Scripting : FolderSpy v0.96 [ Synchronous ]
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
tic



Joined: 22 Apr 2007
Posts: 1373

PostPosted: Tue Oct 02, 2007 9:48 am    Post subject: Reply with quote

Quote:
@tic: Please allow me sometime.


sure thing boss! looking forward to this Smile
Back to top
View user's profile Send private message
tic



Joined: 22 Apr 2007
Posts: 1373

PostPosted: Wed Oct 10, 2007 12:10 pm    Post subject: Reply with quote

No luck on this anyone? To have more than 1 folder specified
Back to top
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1388

PostPosted: Wed Oct 10, 2007 3:26 pm    Post subject: Reply with quote

Skan wrote:
Please allow me sometime.

I don't really know if it'll work or not, however, I think it's worth trying.
The outcome will depend on the underlying mechanism of ReadDirectoryChangesW, I suppose.

If creating multiple monitoring is problematic, then I would rather use junction. Create an empty directory, then set up a different junction point as its subdirectory corresponding to each directory to be monitored. Finally set the directory itself as the monitored directory of ReadDirectoryChangesW.

At least one volume should be formated as NTFS.
Back to top
View user's profile Send private message
tic



Joined: 22 Apr 2007
Posts: 1373

PostPosted: Wed Oct 10, 2007 6:13 pm    Post subject: Reply with quote

I would be fine with that idea Sean, but how then would you monitor 10 drives? as in A:\, B:\, C:\.....
Back to top
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1388

PostPosted: Wed Oct 10, 2007 10:21 pm    Post subject: Reply with quote

tic wrote:
I would be fine with that idea Sean, but how then would you monitor 10 drives? as in A:\, B:\, C:\.....

In this case, you have to be careful in using a junction, to not enter an infinite loop. I would create 9 junctions of other drives in the chosen (NTFS) drive, then monitor that chosen drive.
Back to top
View user's profile Send private message
tic



Joined: 22 Apr 2007
Posts: 1373

PostPosted: Wed Oct 10, 2007 10:51 pm    Post subject: Reply with quote

so youre saying to mount all those drives onto your c drive and then monitor the entire c drive and then filter the results so only the 1s in the folders you want are displayed?

if this is what you mean, then wouldnt that be quite resource wasteful? and also when you say junction, which command are you talking about? subst, mountvol...? and is there a way to do this purely in ahk.

thanks
Back to top
View user's profile Send private message
ahklerner



Joined: 26 Jun 2006
Posts: 1249
Location: USA

PostPosted: Wed Oct 10, 2007 11:05 pm    Post subject: Reply with quote

junction is a command line tool you get from m$. Titan mentioned it recently...when talking about custom stdlib directories.
_________________

ʞɔпɟ əɥʇ ʇɐɥʍ
Back to top
View user's profile Send private message
ahklerner



Joined: 26 Jun 2006
Posts: 1249
Location: USA

PostPosted: Wed Oct 10, 2007 11:06 pm    Post subject: Reply with quote

Ah...here it is:
http://www.autohotkey.com/forum/viewtopic.php?t=23590
_________________

ʞɔпɟ əɥʇ ʇɐɥʍ
Back to top
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1388

PostPosted: Wed Oct 10, 2007 11:13 pm    Post subject: Reply with quote

tic wrote:
so youre saying to mount all those drives onto your c drive and then monitor the entire c drive and then filter the results so only the 1s in the folders you want are displayed?

It's not exactly mount. Anyway, wasn't this what you really wanted to do?
I always felt that you're ambiguous in saying what you meant/wanted to do. (no offense intended)

Quote:
if this is what you mean, then wouldnt that be quite resource wasteful?

I suppose no more than creating 10 threads for each monitoring.

Quote:
and also when you say junction, which command are you talking about? subst, mountvol...? and is there a way to do this purely in ahk.

Which OS are you using?
If Vista, I think you can use CreateSymbolicLink API, but I can't tell for sure as I have no access to Vista.
If other OS >= W2K, you have to use DeviceIoControl API with FSCTL_SET_REPARSE_POINT/FSCTL_GET_REPARSE_POINT/FSCTL_DELETE_REPARSE_POINT.

Or you may use external tools, like linkd.exe in MS's resource kit, junction.exe from Sysinternals, etc.
Back to top
View user's profile Send private message
tic



Joined: 22 Apr 2007
Posts: 1373

PostPosted: Thu Oct 11, 2007 10:30 pm    Post subject: Reply with quote

I had a look at CreateSymbolicLink but couldnt see how this could be used to do what you described. I wanted this to be able to monitor activity on user defined locations, and did not want to use a 3rd party tool, so was hoping asynchronous mode would be possible.

Why did Joy2DWorld say
Quote:

likely there are better ways, and did not extensively test it, but seemed to work fine for me


Would he be able to post the code he used?

Quote:
I suppose no more than creating 10 threads for each monitoring.


And surely it would be much more resource wasteful. Say for example I define that I wish to monitor C:\test and E:\test\test2 and F:\test\test2\test3

and then there is loads of activity constantly at the location C:\ then every time a file is created/modified/renamed/deleted there, then it would have to be checked, despite it being useless.
Back to top
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1388

PostPosted: Thu Oct 11, 2007 10:52 pm    Post subject: Reply with quote

tic wrote:
Say for example I define that I wish to monitor C:\test and E:\test\test2 and F:\test\test2\test3

This is the reason why I said you're ambiguous.
As a matter of fact, from your last post I suspected that you might not intend to monitor whole drives but some specific directories, but you had said A:\, B:\, C:\, etc for it.

Anyway, the solution is simple. Remember I said "it's not exactly mount". Just create the junctions for the directories C:\test and E:\test\test2 and F:\test\test2\test3.
Back to top
View user's profile Send private message
tic



Joined: 22 Apr 2007
Posts: 1373

PostPosted: Thu Oct 11, 2007 11:10 pm    Post subject: Reply with quote

But im not being ambiguous

Quote:
I wanted this to be able to monitor activity on user defined locations


I want it to be any location. whther it be a drive, many drives, a folder, many folder, or many drives and folders.

I see what you mean about only creating junctions for the folders specified, but I still believe that to be inefficient, but this is besides the point really. id rather have it working and then optimize it.

So how could i create this junction without external tools?
Back to top
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1388

PostPosted: Fri Oct 12, 2007 12:22 am    Post subject: Reply with quote

tic wrote:
Quote:
I wanted this to be able to monitor activity on user defined locations

Are you really expecting me to read all your posts, just to answer your question? Does it make sense? Don't you think it's the job of the one who asks to make the question clear? Even my first reply on this thread wasn't toward you.

Quote:
So how could i create this junction without external tools?

Please don't make me repeat myself, I hate to do it. I already said about it. Go figure and choose whatever suits for you.

Quote:
and then there is loads of activity constantly at the location C:\ then every time a file is created/modified/renamed/deleted there

BTW, you don't have to create the junction point always on the root directory. Read again my first post on this thread.


Last edited by Sean on Fri Oct 12, 2007 12:38 am; edited 1 time in total
Back to top
View user's profile Send private message
tic



Joined: 22 Apr 2007
Posts: 1373

PostPosted: Fri Oct 12, 2007 12:38 am    Post subject: Reply with quote

Youre being a bit touchy Sean. You dont need to repeat yourself
Quote:

Are you really expecting me to read all your posts, just to answer your question?


Yes, I do. Why even post in a forum if youre not going to read my reply to you

You said it wasnt clear, so i clarified to you, and then you didnt read it, and then say "well its not my job to read your posts". So why ask anything if you wont read the answer?

Quote:
Please don't make me repeat myself, I hate to do it. I already said about it. Go figure and choose whatever suits for you.


Again, youre not reading my posts directed at you. I said I couldnt understand how to use DeviceIoControl. Im sorry if im just too dumb for you to have to have to read my posts, but i feel its a legitimate question that i cannot easily obtain the answer to.
Back to top
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1388

PostPosted: Fri Oct 12, 2007 12:51 am    Post subject: Reply with quote

tic wrote:
I said I couldnt understand how to use DeviceIoControl. Im sorry if im just too dumb for you to have to have to read my posts, but i feel its a legitimate question that i cannot easily obtain the answer to.

You didn't say about DeviceIoControl, but about CreateSymbolicLink which appears really simple to use. Anyway, you may ask someone else for it as I myself won't release the code on creating junctions via DeviceIoControl. OK, I think I did it once or twice in the past, but probably I will never again post the codes based on not/ill documented functions, especially if it's a sensitive one. In fact, this one is worse than undocumented.

I'm warning you, you have to be really really careful when dealing with junctions, especially if it's the first time you're about to use it. I suggest to play with it for some time with folders/files which are OK to be lost.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 2 of 6

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group