how to Get All events of specific Folder from OS File system

Dear All,

How to Get All Event Happened in specific folder for ex(Delete Event, rename,last modified date) and its sub directory using OS File System

Thanks
wael_shehabAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lokesh B RDeveloperCommented:
Hi,

You can use FileSystemWatcher  Class to monitor all the events on any file/sub folders inside that.

Read more with example:
https://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher(v=vs.110).aspx
0
wael_shehabAuthor Commented:
thank you for reply
but   i am working in web service application so how or where  can i call  this class,
Thanks
0
Lokesh B RDeveloperCommented:
Hi,

You can initiate the FileSystemWatcher object on the Folder where your web service in deployed and you can get the notifications and do the necessary things (logging to file).

Make sure the Folder is accessible from the service class.
0
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

wael_shehabAuthor Commented:
Thanks
but is there any way to do the same thing with out using exe program or windows From application
0
Lokesh B RDeveloperCommented:
Hi,

No.

You need to tell the FileSystemWatcher class to monitor the folder at some point. So you need either Windows Service/ Windows Forms/ Some Scheduler application to do this.

Since it doesn't know when to do the monitoring.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
wael_shehabAuthor Commented:
Thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.