![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Monitor a file, generate log when it was copied To All: I'm looking for a method to monitor a specify doc, when it was copied it will generate a log, the doc file has been encrypted.Any idea? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Monitor a file, generate log when it was copied "Buddy" <qinfengbin@newsgroup> wrote in message news:uLZ8SWZPKHA.3256@newsgroup Quote: > To All: > > I'm looking for a method to monitor a specify doc, when it was copied it > will generate a log, > the doc file has been encrypted.Any idea? |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Monitor a file, generate log when it was copied The File's Full Path is d:\documents\List.Doc.If someone copy this file, and it will generate a log file. "Pegasus [MVP]" <news@newsgroup> дÈëÏûÏ¢ÐÂÎÅ:eGYX9WbPKHA.4580@newsgroup Quote: > > "Buddy" <qinfengbin@newsgroup> wrote in message > news:uLZ8SWZPKHA.3256@newsgroup Quote: >> To All: >> >> I'm looking for a method to monitor a specify doc, when it was copied it >> will generate a log, >> the doc file has been encrypted.Any idea? > Can you be a little more specific? > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Monitor a file, generate log when it was copied OK. What if the file already exists? What if someone edits, then saves the file? "Buddy" <qinfengbin@newsgroup> wrote in message news:uycDuBePKHA.4244@newsgroup Quote: > The File's Full Path is d:\documents\List.Doc.If someone copy this file, > and it will generate a log file. > > "Pegasus [MVP]" <news@newsgroup> > дÈëÏûÏ¢ÐÂÎÅ:eGYX9WbPKHA.4580@newsgroup Quote: >> >> "Buddy" <qinfengbin@newsgroup> wrote in message >> news:uLZ8SWZPKHA.3256@newsgroup Quote: >>> To All: >>> >>> I'm looking for a method to monitor a specify doc, when it was copied it >>> will generate a log, >>> the doc file has been encrypted.Any idea? >> Can you be a little more specific? >> > |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Monitor a file, generate log when it was copied Buddy wrote: Quote: > I'm looking for a method to monitor a specify doc, when it was copied it > will generate a log, the doc file has been encrypted.Any idea? > I will be greatly surprised if you find a way to do this via script. Generally speaking, when you wish to be notified of some system activity, you have to insert a "hook" into the system. In your case, an appropriate hook would be a "Copy Hook". Read this: http://msdn.microsoft.com/en-us/libr...63(VS.85).aspx As you can see, that is a somewhat sophisticated mechanism, and requires some other language (not vbs). I had initially thought that one of the "File Watcher" utilities might be of use, but after reading through some of the descriptions of these utilities, I think not. But then, you can google "File Watcher Utility" and see for yourself. cheers, jw ____________________________________________________________ You got questions? WE GOT ANSWERS!!! ..(but, no guarantee the answers will be applicable to the questions) |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Monitor a file, generate log when it was copied To All: Thanks For All Your Help, I also think it's very difficult.So if there's a tool to do job is also OK! "mr_unreliable" <kindlyReplyToNewsgroup@newsgroup> ??????:ODunV7fPKHA.352@newsgroup Quote: > Buddy wrote: Quote: >> I'm looking for a method to monitor a specify doc, when it was copied it >> will generate a log, the doc file has been encrypted.Any idea? > hi Buddy, > > I will be greatly surprised if you find a way to do this > via script. > > Generally speaking, when you wish to be notified of some > system activity, you have to insert a "hook" into the > system. In your case, an appropriate hook would be > a "Copy Hook". Read this: > > http://msdn.microsoft.com/en-us/libr...63(VS.85).aspx > > As you can see, that is a somewhat sophisticated mechanism, > and requires some other language (not vbs). > > I had initially thought that one of the "File Watcher" > utilities might be of use, but after reading through some > of the descriptions of these utilities, I think not. > But then, you can google "File Watcher Utility" and > see for yourself. > > cheers, jw > ____________________________________________________________ > > You got questions? WE GOT ANSWERS!!! ..(but, no guarantee > the answers will be applicable to the questions) |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Monitor a file, generate log when it was copied To Pegasus : It ignore the other event but copy event. "Pegasus [MVP]" <news@newsgroup> дÈëÏûÏ¢ÐÂÎÅ:eI7OfDfPKHA.4428@newsgroup Quote: > OK. What if the file already exists? What if someone edits, then saves the > file? > > "Buddy" <qinfengbin@newsgroup> wrote in message > news:uycDuBePKHA.4244@newsgroup Quote: >> The File's Full Path is d:\documents\List.Doc.If someone copy this file, >> and it will generate a log file. >> >> "Pegasus [MVP]" <news@newsgroup> дÈëÏûÏ¢ÐÂÎÅ:eGYX9WbPKHA.4580@newsgroup Quote: >>> >>> "Buddy" <qinfengbin@newsgroup> wrote in message >>> news:uLZ8SWZPKHA.3256@newsgroup >>>> To All: >>>> >>>> I'm looking for a method to monitor a specify doc, when it was copied >>>> it will generate a log, >>>> the doc file has been encrypted.Any idea? >>> >>> Can you be a little more specific? >>> >> > |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Monitor a file, generate log when it was copied "Buddy" <qinfengbin@newsgroup> wrote in message news:ueX6jGpPKHA.1280@newsgroup Quote: > To Pegasus : > It ignore the other event but copy event. sFileName = "d:\temp\test.txt" iInterval = 60000 'Milliseconds sName = "'" & Replace(sFileName, "\", "\\") & "'" Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colFiles = objWMIService.ExecQuery _ ("Select * from CIM_Datafile Where Name = " & sName) For Each objFile In colFiles strOriginalTimestamp = objFile.LastModified Next WScript.Echo "Monitoring """ & sFileName & """ " & Now Do While True WScript.Sleep iInterval Set colFiles = objWMIService.ExecQuery _ ("Select * from CIM_Datafile Where Name = " & sName) For Each objFile In colFiles strLatestTimestamp = objFile.LastModified Next If strLatestTimestamp <> strOriginalTimestamp Then strOriginalTimestamp = strLatestTimestamp WScript.Echo Now & " The file """ & sFileName _ & """ has been modified in the last " _ & iInterval\1000 & " seconds" strOriginalTimestamp = strLatestTimestamp End If Loop |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Does Vista Generate a file during the update process? | Vista General | |||
| RE: Can we generate a VHD file out of a real Hard Disk? | Virtual PC | |||
| new name of copied file | VB Script | |||
| file has properties that cannot be copied | Vista General | |||
| File Manager doesn't display WHAT file is being copied/moved!?!?!?! | Vista file management | |||