Skip to content

Shell extension menu for the template-based file system scan

Notifications You must be signed in to change notification settings

sensboston/FileSystemScanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileSystemScanner

Shell extension menu for the template-based file system scan

1. Variables (Files/Folders):

Variable

For Files

For Folders

Item (file or folder) name as seen by Explorer (string)

{%name%}

{%name%}

Item full name including a full path (string)

{%fullname%}

{%fullname%}

Item path without name (string)

{%path%}

{%path%}

Number of items inside the folder. (number)

-

{%itemcount%}

Size in bytes (number)

{%bytesize%}

-

Size (human friendly) with suffixes 'B', 'kB', 'MB' ,'GB', 'TB' etc. (string)

{%size%}

-

Date of creation in “yyyy-mm-dd” format (string)

{%created%}

-

Date of modification in “yyyy-mm-dd” format (string)

{%modified%}

-

File extension. If no extension, should explicitly use “unknown” (string)

{%extension%}

-

File type detected based on the file extension. File types: “audio” (mp3, aac, mpa etc.), “video” (avi, mkv, mp4, mpeg etc.), “text” (txt, doc, srt, sub etc.). If not detected by extension, should explicitly use “unknown”[a]

{%type%}

-

2. Variables (scan):

The act of scanning (taking snapshot) may have it’s own set of variables. For example with XML output the root element - <scan> - may have some attributes like date of scanning and media info (volume label, file system etc). This approach assumes that all selected files and/or folders reside on the same volume/drive. Even though it is technically possible to feed to the scanning application two files/folders residing on different drives/volumes, the program should detect the scan variables based on the FIRST received item only. All the remaining items in the selection should be processed without detecting the parameters of the volume they are residing on.

Variable

The date scanning took place in “yyyy-mm-dd” format (string)

{%scandate%}

The volume label/id on which the scanned files/folders reside (string)

{%volumelabel%}

The filesystem of the volume the scanned files/folders reside: NTFS, FAT32, EXT4 etc. (string)

{%filesystem%}

Count of items (total) processed in the scan (number)

{%itemcount%}

Count of folders processed in the scan (number)

{%foldercount%}

Count of files processed  in the scan (number)

{%filecount%}

Scan time in seconds (number), for debug purposes and performance testing

{%elapsed%}

3. Features:

  • Program should be launched by context menu over the selection of files and/or folders. The context menu may have nested submenu with entries for each available format template (XML, HTML, JSON etc.)
  • Recursively ignore special & hidden system files (desktop.ini, thumbs.db, .htaccess etc.) while iterating over the selected items. It may be necessary to implement the ignore list (using MS-DOS-like file masks - for example *.ico, f?ck.txt)[1]
  • Launching the program directly (without passing a selection of files/folder) starts the program with template-editing UI. The template(s) may be saved either in windows registry or as file(s) residing in the same folder as the program’s executable file.
  • Launching the program directly (especially - for the first time) should check whether it is set to run as a service4, check the necessary registry keys (for context menu functionality) and set them up if necessary. Modal dialog/alert may be required to display the meaningful message: “First run detected. Configuration is complete!”

Important note

Files and folders with a special (i.e administrators) permissions will be not processed until host process, explorer.exe will be restarted with the administrator's credentials and permissions. These items will be skipped in scan.


[1] Ignored files and folder will not processed at all: i.e. not included in folder total size and items count. You may use regular expressions for the file and folder masks.

Installation

This shell extension is using SharpShell project.

To install, run install.cmd from the "Install" directory.

For uninstalling, run uninstall.cmd script.

About

Shell extension menu for the template-based file system scan

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published