By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,694 Members | 1,313 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,694 IT Pros & Developers. It's quick & easy.

How to find out which file is being accessed via FTP?

P: n/a
I'd like to create a small client app that sits on a user's computer and
monitors their FTP activity to one certain server. The client app will
update a server app that then distributes this information to all client
apps. This means if 5 people are using the client app and are accessing the
server via FTP, they will see which files are being accessed by others that
are also using FTP.

Consider each client will be using their own FTP program but I will know
ahead of time what it is. Any bird's eye view suggestions on how I would go
about doing this?

Thanks,
Brett
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
One way to get started monitoring files is the FileWatcher:

watchfolder.NotifyFilter = IO.NotifyFilters.DirectoryName
watchfolder.NotifyFilter = watchfolder.NotifyFilter Or _
IO.NotifyFilters.FileName
watchfolder.NotifyFilter = watchfolder.NotifyFilter Or _
IO.NotifyFilters.Attributes
watchfolder.NotifyFilter = watchfolder.NotifyFilter Or _
IO.NotifyFilters.LastAccess

' add the handler to each event
AddHandler watchfolder.Changed, AddressOf logchange
AddHandler watchfolder.Created, AddressOf logchange
AddHandler watchfolder.Deleted, AddressOf logchange

where logchange displays the change information. Problem is that this line
for example:

AddHandler watchfolder.Changed, AddressOf logchange

watchfolder only has these attributes:
- changed
- created
- deleted
- error
- renamed

Meaning the IO.NotifyFilters.LastAccess will never trigger. If some one
opens the file, they are accessing it but doing none of the above five
listed events. Is there a way to get a trigger on file access even if the
user is only reading? In other words, a file open.

Brett

"Brett" <no@spam.net> wrote in message
news:uw**************@TK2MSFTNGP14.phx.gbl...
I'd like to create a small client app that sits on a user's computer and
monitors their FTP activity to one certain server. The client app will
update a server app that then distributes this information to all client
apps. This means if 5 people are using the client app and are accessing
the server via FTP, they will see which files are being accessed by others
that are also using FTP.

Consider each client will be using their own FTP program but I will know
ahead of time what it is. Any bird's eye view suggestions on how I would
go about doing this?

Thanks,
Brett

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.