• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Windows script to trace a file

Subbarao

Junior Member
Hi,

I need a shell script to trace the files. i need to get user id who all are opening the files. Files can be CSV, TXT, or PDF.

For eg, consider Excel, we wrote a macro, such that when ever a user opens the file, macro triggers event, inserts a record, which consists of user id and sheet name to the Database.

Now we need trace same for the CSV, TXT and PDF file type. Is there any mechanism to find out such things.

I would be glad if any one can help me on this.

Thank you.
 
Can anyone there write C++, C#, Visual Basic programs?

You could make everyone use a front-end application that lets them browse for files and then it logs the selection and opens the file.

To keep someone from just using Open in Adobe Reader, etc. you'd need to either encrypt / decrypt the files on open - close or maybe try something with Windows accounts and access rights where only your program runs with the rights needed to copy from the document folder.

Or, you could store the documents on a server like SharePoint and log all access on the server side,

Note: these approaches and your macro will not stop someone from using Save As in the application to make a copy of the file. So you can detect that they opened the file once but not that they saved a copy to a Flash key.

---

A step beyond that would be making it so only your viewing app is used to view the documents, either web-based like Office 365 and Google Docs, or using Office replacement components like Farpoint / ComponentOne Spread:
https://www.componentone.com/SuperProducts/SpreadStudio/

---

The next step beyond that is much more complicated and painful - writing a file system filter driver so you can hook into file operations like anti-virus software does:
http://msdn.microsoft.com/en-us/library/windows/hardware/gg462968.aspx
 
FWIW, depending on your version of Windows, you can set up file auditing then specify the files you want to audit and find the results in the Windows event security log.
 
Yeah, if you need this kind of security you should probably move the files behind a wall. There are a couple of ways to listen for file system activity in Windows, but they are all subject to client-side tampering.
 
an alternative is to put the files in a database (MySql or whatever), that way they are not in the file system so they can't be opened unless they access the database, and there you can have all sorts of logs/restrictions.
 
Back
Top