Download Latest Version DirEvents_v1.8_x86.zip (4.4 kB)
Email in envelope

Get an email when there's a new version of DirEvents

Home
Name Modified Size InfoDownloads / Week
src 2019-10-12
examples 2019-09-30
bin 2019-09-23
readme.md 2019-10-12 4.6 kB
Totals: 4 Items   4.6 kB 0

1. The files included in this software package are published under MIT license:

Copyright (c) 2019 Steffen Illhardt

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


2. Usage of the DirEvents.exe command line utility:

DirEvents v1.8, Observe changes in a directory.

DirEvents "directory" [/s]
  directory  Fully qualified path of the directory to be observed.
  /s         (optional) Observe subdirectories.

Change events read are outputted in one line each, consisting of six
space-separated columns.
 The first column contains the time the event was cached (yyyyMMddHHmmssSSS).
 The second and the third column represent the trigger of the event:
  0x0001 FILE_NAME   The file name changed which includes renaming, creating,
                      or deleting a file.
  0x0002 DIR_NAME    The directory name changed which includes renaming,
                      creating, or deleting a directory.
  0x0004 ATTRIBUTES  Any attribute changed.
  0x0008 SIZE        The file size changed.
  0x0010 LAST_WRITE  The last write time changed.
  0x0020 LAST_ACCESS The last access time changed.
  0x0040 CREATION    The creation time changed.
  0x0100 SECURITY    The security descriptor changed.
 The fourth and the fifth column represent the action related to the event:
  1 ADDED            The file was added to the directory.
  2 REMOVED          The file was removed from the directory.
  3 MODIFIED         Time stamp, size, or attributes were modified.
  4 RENAMED_OLD_NAME The file was renamed and this is the old name.
  5 RENAMED_NEW_NAME The file was renamed and this is the new name.
 The sixth column is quoted and contains the path of the changed file,
 relative to the observed directory. It may contain short names.

3. Additional information:

  • Please find examples of how to use the utility in Batch and PowerShell scripts in the examples folder. NOTE: The output of the utility can not be processed in a FOR /F loop of a Batch script. This kind of loop is buffering the output.
  • If DirEvents fails to read, queue, or print events it outputs appropriate messages to the standard error stream. If those errors don't violate the integrity of the process, DirEvents continues with the next events.
  • Keep in mind that a large tree of subdirectories may fire more events than you can handle in your scripts. In this case, RAM space may be running out because DirEvents caches the events in a dynamically allocated queue. Logging the output of the tool in one of the observed directories may cause the same effect.
  • The longer paths and file names are within the observed directory or tree, the fewer events will fit into the internal buffers. A buffer overflow results in the loss of all data for the associated timestamp. E.g. the deletion of a folder containing many files with long relative paths may cause this "Buffer too short" error.

4. Release notes:

  • 2019/10/12 - v1.8.0/1.0 simplify program termination
  • 2019/10/12 - v1.7.0/1.0 simplify getting program options, queuing, and freeing memory
  • 2019/10/06 - v1.6.0/1.0 reduce number of memory allocations by half, simplify queuing
  • 2019/10/05 - v1.5.0/1.0 simplify concurrent printing
  • 2019/10/02 - v1.4.0/1.0 let Ctrl+C pass through, prepend timestamp to error messages
  • 2019/09/30 - v1.3.0/1.0 properly set file pointer in x86 build
  • 2019/09/29 - v1.2.0/1.0 safe integer conversion, error messages added
  • 2019/09/28 - v1.1.0/1.0 memory management and help message updated
  • 2019/09/23 - v1.0.0/1.0 initial release
Source: readme.md, updated 2019-10-12