viewpoint-particle

Author Topic: Detect Folder Move in File Server  (Read 1421 times)

atoll1

  • Newbie
  • *
  • Posts: 3
Detect Folder Move in File Server
« on: August 31, 2014, 11:19:45 pm »
I wanted to wirte a script to detect if users are moving folders ( intentionally or accidentally ) from our File server, but not sure where to start.
I am thinking that Winbatch will use a high memory utilization if a script recurses thru all folders /sub-folders in the file server and detect if a folder was
moved. Here's a pseudocode:
- script runs as a service on the file server
- script recurses thru all folders/sub-folders
- if a folder was moved by a user, winbacth detects the folder moved
- writes a log which folder was moved and to which Unc path the folder was moved

-Any ideas or snippets,  this is whirling in my head I don't want to use other tools except winbatch? Thanks

td

  • Tech Support
  • *****
  • Posts: 2084
    • WinBatch
Re: Detect Folder Move in File Server
« Reply #1 on: September 02, 2014, 07:16:54 am »
The following link illustrates several techniques for monitoring a single directory. 

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Samples~from~Users+Watch~(Monitor)~a~Directory.txt

Not sure how well any of those techniques will scale to monitoring a large number of directors and am not sure if you be able to obtain a destination location of a file move when the moved is to a different file system.

You could always create an inventor of existing files and then periodically check for new or removed files using either the FileItemPath function or the File and Folder Finder (FAF) extender.  The FAF extender is included in the Search extender download.   

The FAF extender or FileItemPath approach might be appropriate for identifying a file move but it would not help identifying the new location of a file targeted by a move operations unless you also monitored all possible move-to locations.
"DON'T PANIC"
The Hitchhiker's Guide to the Galaxy, Douglas Adams