This website uses cookies. Accept Cookies Find out more

Creating an inventory with FileWatcher

Article Id:
KB305
Published:
18 Jan 2019, last updated 18 Jan 2019 12:50
Reading Time:
12 minutes, 1 second

Introduction

This article provides a step-by-step guide to creating a file and folder inventory using FileWatcher. To be able to complete this guide, you will need access to the windows command prompt and the necessary permissions to the files and folders you wish to inventorise.

Creating the Inventory

About this example

In this article we shall be creating an inventory using the minimum required options for FileWatcher. The key values are:

  • The folder in which the FileWatcher application is stored is D:\Testing
  • The files and folders to be inventorised are stored in D:\Testing\FolderToInventory
  • The folder into which the inventory will be saved is D:\Testing\MyInventories

This translates into the command:

FileWatcher /CI /IF "D:\Testing\FolderToInventory" /IS "D:\Testing\MyInventories"

You may further customise the output and actions of FileWatcher by using additional command line parameters.

Step 1: At the command line

Open a command prompt. This may done either by click searching for "Command Prompt" or pressing Windows Key + R and entering "cmd" and then pressing enter.

Once in the command prompt, go to the location were FileWatcher application is stored.

cd "D:\Testing"

Enter the create inventory FileWatcher command and then hit enter.

FileWatcher /CI /IF "D:\Testing\FolderToInventory" /IS "D:\Testing\MyInventories"

FileWatcher will now start.

Step 2: FileWatcher creates the inventory

Once you hit enter, FileWatcher will start to generate the inventory. How long this takes is entirely dependent on the number of files and folders found, their respective sizes and the performance of your computer.

During the inventory process, FileWatcher will write details of what is doing to the command (aka Console). This output is actually the same content as may be found in the inventory log and should look something like this:

18 JAN 2019 11:32:21     Information    *** Starting Inventory ***
18 JAN 2019 11:32:21     Information    Inventory Ident: Inventory-18-Jan-2019_113221
18 JAN 2019 11:32:21     Information    Inventory Name: New Inventory 18 Jan 2019 11:32:21
18 JAN 2019 11:32:21     Information    Folder to inventory: D:\Testing\FolderToInventory
18 JAN 2019 11:32:21     Information    Folder to save inventory: D:\Testing\MyInventories
18 JAN 2019 11:32:21     Information    Inventory filename: D:\Testing\MyInventories\Inventory-18-Jan-2019_113221.xml
18 JAN 2019 11:32:21     Information    Inventory log: D:\Testing\MyInventories\Inventory-18-Jan-2019_113221.log
18 JAN 2019 11:32:21     Information    Reading folder D:\Testing\FolderToInventory
18 JAN 2019 11:32:21     Information    - Child folders: 1
18 JAN 2019 11:32:21     Information    Reading folder D:\Testing\FolderToInventory\Classic Fine Art
18 JAN 2019 11:32:21     Information    Adding file 'D:\Testing\FolderToInventory\Classic Fine Art\Adoration_of_the_Magi_(Mantegna).jpg'
18 JAN 2019 11:32:21     Information    - Size: 199.68 KB
18 JAN 2019 11:32:21     Information    - Checksum generated '32AB43FDE36C455C41C1EE84AACA159DE471F7795AF5415196FCDEEE1E9C82FB'
18 JAN 2019 11:32:21     Information    - time taken 2 milliseconds
18 JAN 2019 11:32:21     Information    Adding file 'D:\Testing\FolderToInventory\Classic Fine Art\Alexander's_Victory_(Altdorfer).jpg'
18 JAN 2019 11:32:21     Information    - Size: 264.67 KB
18 JAN 2019 11:32:21     Information    - Checksum generated '4CC2468933C22BA82E6F266784588A7A6465275348D2F0FA412C8E0C86ED1390'
18 JAN 2019 11:32:21     Information    - time taken 1 millisecond
18 JAN 2019 11:32:21     Information    Adding file 'D:\Testing\FolderToInventory\Classic Fine Art\American_Gothic_(Wood).jpg'
18 JAN 2019 11:32:21     Information    - Size: 185.07 KB
18 JAN 2019 11:32:21     Information    - Checksum generated '0272AAE3167526FCAEEFD4169CA8B3F6FFE43918330C4BF760AAED859267AE36'
18 JAN 2019 11:32:21     Information    - time taken 1 millisecond
18 JAN 2019 11:32:21     Information    Adding file 'D:\Testing\FolderToInventory\Classic Fine Art\Aristotle_Contemplating_the_Bust_of_Homer_(Rembrandt).jpg'
18 JAN 2019 11:32:21     Information    - Size: 189.24 KB
18 JAN 2019 11:32:21     Information    - Checksum generated '232D2C082D059FE8B2F0AEDC37FC54CC4E370C658E68347683413D42B383E7E8'
18 JAN 2019 11:32:21     Information    - time taken 1 millisecond
18 JAN 2019 11:32:21     Information    Adding file 'D:\Testing\FolderToInventory\Classic Fine Art\A_Bar_at_the_Folies-Bergere_(Manet).jpg'
18 JAN 2019 11:32:21     Information    - Size: 203.30 KB
18 JAN 2019 11:32:21     Information    - Checksum generated '1F034E98228CE91A2F8540648FC562CCD538C5D1F71F0C3E4AEDBC8211437BEC'
18 JAN 2019 11:32:21     Information    - time taken 1 millisecond
18 JAN 2019 11:32:21     Information    Adding file 'D:\Testing\FolderToInventory\Classic Fine Art\A_Vanitas_Still_Life_(Claesz).jpg'
18 JAN 2019 11:32:21     Information    - Size: 105.31 KB
18 JAN 2019 11:32:21     Information    - Checksum generated '0F4DD093C504E6A2755A818F3701E765541B71A35BB860575940E9E03619076C'
18 JAN 2019 11:32:21     Information    - time taken 1 millisecond
18 JAN 2019 11:32:21     Information    Adding file 'D:\Testing\FolderToInventory\Classic Fine Art\A_Young_Girl_Reading_(Fragonard).jpg'
18 JAN 2019 11:32:21     Information    - Size: 185.51 KB
18 JAN 2019 11:32:21     Information    - Checksum generated 'BC8C85C95EA95B492795DA98A658EC059E95B978FDCC4A91685555E534E80F34'
18 JAN 2019 11:32:21     Information    - time taken 1 millisecond
18 JAN 2019 11:32:21     Information    Adding file 'D:\Testing\FolderToInventory\Classic Fine Art\Bathing_at_Asniers.jpg'
18 JAN 2019 11:32:21     Information    - Size: 240.38 KB
18 JAN 2019 11:32:21     Information    - Checksum generated 'AD30BCE18057AA5ACBF2D4FAB2CCDA3A9E2D75520039E9D4C42C6869618239E7'
18 JAN 2019 11:32:21     Information    - time taken 1 millisecond
18 JAN 2019 11:32:21     Information    Adding file 'D:\Testing\FolderToInventory\Classic Fine Art\Thumbs.db'
18 JAN 2019 11:32:21     Information    - Size: 240.00 KB
18 JAN 2019 11:32:21     Information    - Checksum generated '6D9E368A90D4CD284A7BF5BE420C38B31137E851EEF7199C331BFCF03F2CB318'
18 JAN 2019 11:32:21     Information    - time taken 1 millisecond
18 JAN 2019 11:32:21     Information    Added folder 'D:\Testing\FolderToInventory\Classic Fine Art'
18 JAN 2019 11:32:21     Information    Adding file 'D:\Testing\FolderToInventory\03_hd.png'
18 JAN 2019 11:32:21     Information    - Size: 1.63 MB
18 JAN 2019 11:32:21     Information    - Checksum generated 'A0766BB2869543D8EB4DF610DF962EADF2D60AE0B1E7657E980057813DCE455E'
18 JAN 2019 11:32:21     Information    - time taken 8 milliseconds
18 JAN 2019 11:32:21     Information    Adding file 'D:\Testing\FolderToInventory\04_hd.png'
18 JAN 2019 11:32:21     Information    - Size: 1.76 MB
18 JAN 2019 11:32:21     Information    - Checksum generated '995D98D2D085E2530E78B8C3EC279FA2C4469C5E58B7F571C41982E327D852D6'
18 JAN 2019 11:32:21     Information    - time taken 8 milliseconds
18 JAN 2019 11:32:21     Information    Adding file 'D:\Testing\FolderToInventory\05_hd.png'
18 JAN 2019 11:32:21     Information    - Size: 1.76 MB
18 JAN 2019 11:32:21     Information    - Checksum generated '995D98D2D085E2530E78B8C3EC279FA2C4469C5E58B7F571C41982E327D852D6'
18 JAN 2019 11:32:21     Information    - time taken 8 milliseconds
18 JAN 2019 11:32:21     Information    Added folder 'D:\Testing\FolderToInventory'
18 JAN 2019 11:32:21     Information    Inventory saved to 'D:\Testing\MyInventories\Inventory-18-Jan-2019_113221.xml'
18 JAN 2019 11:32:21     Information    Overview
18 JAN 2019 11:32:21     Information    - Folders: 2
18 JAN 2019 11:32:21     Information    - Files: 12
18 JAN 2019 11:32:21     Information    - Size: 6.91 MB
18 JAN 2019 11:32:21     Information    *** Inventory Completed ***

The last five lines of the output provide an overview of the inventory including the number of files and folders processed.

Step 3: The Generated Inventory

The inventory generated in this example is found in the D:\Testing\MyInventories folder. Unless an inventory file was manually specified using the /IS argument, FileWatcher will automatically generate an inventory filename based on the system date and time the inventory was started. For example, Inventory-18-Jan-2019_113221.xml with the associated log file of Inventory-18-Jan-2019_113221.log.

The inventory is stored in XML format that is readable by FileWatcher. Any alterations to this file may cause errors if you use the inventory for comparison operations.

<?xml version="1.0" encoding="utf-8"?>
<inventory>
  <inventoryInformation>
    <name>New Inventory 18 Jan 2019 11:32:21</name>
    <description>Invoked From command line on 18 Jan 2019 at 11:32:21</description>
    <folderPath>D:\Testing\FolderToInventory</folderPath>
    <ident>Inventory-18-Jan-2019_113221</ident>
    <fileCount>12</fileCount>
    <folderCount>2</folderCount>
    <fileSize>7244406</fileSize>
  </inventoryInformation>
  <inventoryItem>
    <type>Folder</type>
    <fullPath>D:\Testing\FolderToInventory</fullPath>
    <relativePath>D:\Testing\FolderToInventory</relativePath>
    <size>5387734</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>18/01/2019 11:26:56</lastModified>
    <checksum />
  </inventoryItem>
  <inventoryItem>
    <type>File</type>
    <fullPath>D:\Testing\FolderToInventory\03_hd.png</fullPath>
    <relativePath>03_hd.png</relativePath>
    <size>1707208</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>16/05/2011 23:36:23</lastModified>
    <checksum>A0766BB2869543D8EB4DF610DF962EADF2D60AE0B1E7657E980057813DCE455E</checksum>
  </inventoryItem>
  <inventoryItem>
    <type>File</type>
    <fullPath>D:\Testing\FolderToInventory\04_hd.png</fullPath>
    <relativePath>04_hd.png</relativePath>
    <size>1840263</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>16/05/2011 23:36:50</lastModified>
    <checksum>995D98D2D085E2530E78B8C3EC279FA2C4469C5E58B7F571C41982E327D852D6</checksum>
  </inventoryItem>
  <inventoryItem>
    <type>File</type>
    <fullPath>D:\Testing\FolderToInventory\05_hd.png</fullPath>
    <relativePath>05_hd.png</relativePath>
    <size>1840263</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>16/05/2011 23:37:51</lastModified>
    <checksum>995D98D2D085E2530E78B8C3EC279FA2C4469C5E58B7F571C41982E327D852D6</checksum>
  </inventoryItem>
  <inventoryItem>
    <type>Folder</type>
    <fullPath>D:\Testing\FolderToInventory\Classic Fine Art</fullPath>
    <relativePath>Classic Fine Art</relativePath>
    <size>1856672</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>18/01/2019 11:26:37</lastModified>
    <checksum />
  </inventoryItem>
  <inventoryItem>
    <type>File</type>
    <fullPath>D:\Testing\FolderToInventory\Classic Fine Art\A_Bar_at_the_Folies-Bergere_(Manet).jpg</fullPath>
    <relativePath>Classic Fine Art\A_Bar_at_the_Folies-Bergere_(Manet).jpg</relativePath>
    <size>208183</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>08/02/2008 00:16:41</lastModified>
    <checksum>1F034E98228CE91A2F8540648FC562CCD538C5D1F71F0C3E4AEDBC8211437BEC</checksum>
  </inventoryItem>
  <inventoryItem>
    <type>File</type>
    <fullPath>D:\Testing\FolderToInventory\Classic Fine Art\A_Vanitas_Still_Life_(Claesz).jpg</fullPath>
    <relativePath>Classic Fine Art\A_Vanitas_Still_Life_(Claesz).jpg</relativePath>
    <size>107836</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>08/02/2008 00:17:52</lastModified>
    <checksum>0F4DD093C504E6A2755A818F3701E765541B71A35BB860575940E9E03619076C</checksum>
  </inventoryItem>
  <inventoryItem>
    <type>File</type>
    <fullPath>D:\Testing\FolderToInventory\Classic Fine Art\A_Young_Girl_Reading_(Fragonard).jpg</fullPath>
    <relativePath>Classic Fine Art\A_Young_Girl_Reading_(Fragonard).jpg</relativePath>
    <size>189963</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>08/02/2008 00:17:32</lastModified>
    <checksum>BC8C85C95EA95B492795DA98A658EC059E95B978FDCC4A91685555E534E80F34</checksum>
  </inventoryItem>
  <inventoryItem>
    <type>File</type>
    <fullPath>D:\Testing\FolderToInventory\Classic Fine Art\Adoration_of_the_Magi_(Mantegna).jpg</fullPath>
    <relativePath>Classic Fine Art\Adoration_of_the_Magi_(Mantegna).jpg</relativePath>
    <size>204469</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>08/02/2008 00:18:11</lastModified>
    <checksum>32AB43FDE36C455C41C1EE84AACA159DE471F7795AF5415196FCDEEE1E9C82FB</checksum>
  </inventoryItem>
  <inventoryItem>
    <type>File</type>
    <fullPath>D:\Testing\FolderToInventory\Classic Fine Art\Alexander's_Victory_(Altdorfer).jpg</fullPath>
    <relativePath>Classic Fine Art\Alexander's_Victory_(Altdorfer).jpg</relativePath>
    <size>271022</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>08/02/2008 00:18:25</lastModified>
    <checksum>4CC2468933C22BA82E6F266784588A7A6465275348D2F0FA412C8E0C86ED1390</checksum>
  </inventoryItem>
  <inventoryItem>
    <type>File</type>
    <fullPath>D:\Testing\FolderToInventory\Classic Fine Art\American_Gothic_(Wood).jpg</fullPath>
    <relativePath>Classic Fine Art\American_Gothic_(Wood).jpg</relativePath>
    <size>189510</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>08/02/2008 00:17:19</lastModified>
    <checksum>0272AAE3167526FCAEEFD4169CA8B3F6FFE43918330C4BF760AAED859267AE36</checksum>
  </inventoryItem>
  <inventoryItem>
    <type>File</type>
    <fullPath>D:\Testing\FolderToInventory\Classic Fine Art\Aristotle_Contemplating_the_Bust_of_Homer_(Rembrandt).jpg</fullPath>
    <relativePath>Classic Fine Art\Aristotle_Contemplating_the_Bust_of_Homer_(Rembrandt).jpg</relativePath>
    <size>193777</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>08/02/2008 00:16:46</lastModified>
    <checksum>232D2C082D059FE8B2F0AEDC37FC54CC4E370C658E68347683413D42B383E7E8</checksum>
  </inventoryItem>
  <inventoryItem>
    <type>File</type>
    <fullPath>D:\Testing\FolderToInventory\Classic Fine Art\Bathing_at_Asniers.jpg</fullPath>
    <relativePath>Classic Fine Art\Bathing_at_Asniers.jpg</relativePath>
    <size>246152</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>08/02/2008 00:19:52</lastModified>
    <checksum>AD30BCE18057AA5ACBF2D4FAB2CCDA3A9E2D75520039E9D4C42C6869618239E7</checksum>
  </inventoryItem>
  <inventoryItem>
    <type>File</type>
    <fullPath>D:\Testing\FolderToInventory\Classic Fine Art\Thumbs.db</fullPath>
    <relativePath>Classic Fine Art\Thumbs.db</relativePath>
    <size>245760</size>
    <created>18/01/2019 11:26:37</created>
    <lastModified>08/02/2008 00:23:23</lastModified>
    <checksum>6D9E368A90D4CD284A7BF5BE420C38B31137E851EEF7199C331BFCF03F2CB318</checksum>
  </inventoryItem>
</inventory>

Once created, the inventory file may be moved anywhere. There is no requirement for keeping the associated log file for any future inventory comparison operations.

 Loading ...
Copyright © 2011 - 2024 Calzada Media Limited. All Rights Reserved