EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

eurodirs.htm
EuroDirs
EuroDirs for Linux
EuroDirs for Windows

  Program EuroDirs from the collection EuroTool will inspect the disk(s) of your PC to find out which directories have changed since the last measurement. This will tell you which directory increased significantly and therefore which application is taking up space on your computer's hard drive.

EuroDirs operates in two modes:

  1. In scan mode (when it was launched with a parameter /ScanNow=yes) it recursively traverses all directories of the computer and writes their size to a file named scan.
    This usually happens automatically in the background by a job launched every now and then by Task Manager or by cron.
  2. In view mode (when /ScanNow=no) it compares the sizes of directories from two different scans and displays directories that have grown, shrunk, or remained the same, sorted by size in a window.
; EuroDirs default configuration: ScanNow=false ; Do not scan if /SN=false, compare scans instead. ScanDir="." ; Directory for scan files. TimeZone=0 ; Time zone of scan files in hours. /TZ=0 for UTC. LeaveTemporary=no ; Do not erase *.name and *.index files (for debugging). MaxDays=32 ; Older scan files will be deleted when /SN=true. InputFile= ; Old scan file to compare. Default is the oldest in ScanDir. OutputFile= ; New scan file to compare. Default is the newest in ScanDir. ExcludeDirs= ; Do not scan dirs beginning with it. Default is empty. IncludeDirs= ; Scan those dirs only. Default is scan all. ViewDirs=Inc ; Ins|Inc|Unch|Dec|Del - select one of 5 views.
How does the program work:
  1. EuroDirs searches for the configuration file /etc/eurotool/eurodirs.ini (Linux) or %AppData%\eurotool\eurodirs.ini (Windows). If it doesn't exist, EuroDirs will try to create it with default arguments.
    You should run EuroDirs with root privilegies for the first time: sudo ./eurodirs.x to allow it create the configuration file in Linux.
  2. Now EuroSort reads arguments from the command line, which may override defaults read from configuration file.
  3. If the argument /ScanNow=yes alias /SN=yes, it will erase scans older then /MaxDays. Then it creates the new scan with current date and terminates.
  4. Otherwise (if /ScanNow=no) EuroDirs will compare two scan files specified by /InputFile and /OutputFile. By default they are empty; in this case /InputFile will be assigned with the oldest scan and /OutputFile with the newest (latest) one.
  5. Size of files from both scans will be compared, files tossed to five categories: increased, decreased, unchanged, inserted, deleted. Each category will be sorted by file size.
  6. EuroDirs displays a window where the user can switch between categories, select different scan files and repeat the comparison.

An example of EuroDirs window:

You can use the Find field to search for a part of directory name to quickly find a specified directory.
In MS Windows version the right-mouse-button-click on the directory name opens Explorer with a new window of this folder.

Directory names are case-sensitive both in Linux and in MS Windows.

Installation

Unlike other EuroTools, EuroDirs cannot be used immediately after unpacking | compilation, it needs at least two scan files in the directory specified by /ScanDir= . EuroDirs should scan disks in root | administrator context, otherwise it has only access to the files of the current user.

For the first time you should run EuroDirs as administrator to let it create the configuration file and then edit this file.
Change the parameter ScanDir= to something like ScanDir=/var/local/eurodirs (Linux) or ScanDir="C:\eurodirs" (Windows).
You might also need to change TimeZone=1 for Prague, TimeZone=2 for Moscow etc.
To include or exclude some folders from scan specify their semicolon-separated names, for instance ExcludeDirs="C:\Temp;R:\".

Now you should schedule EuroDirs to run regulary, e. g. once daily, with parameter -ScanNow=yes.

Internal structure of the scan file is simple: it is a plain text file, its name is YYYY.MM.DD_HH.MM.scan with the current date, hour and minute.
Each line starts with the directory name which is terminated with Horizotal Tab (ASCII 9) and then follows the volume of this directory (decimal digits) terminated with Line Feed (ASCII 10).
Volume of directory is calculated as a sum of netto sizes of all files in this directory plus volumes of any subdirectories (if any). EuroDirs does not take into account cluster size.
Directory names are encoded in UTF-8 both in Linux and in Windows.

During the scan EuroDirs creates two files with the same name as the scan files but with extensions changed to YYYY.MM.DD_HH.MM.names and YYYY.MM.DD_HH.MM.index . These temporary two files are erased at the end of scan (unless /LeaveTemporary=yes)

.

Source code | linker script

↑ EuroDirs
Common configuration and argument processing for both Linux and Windows version:

Both programs in this source file have the name eurodirs . The linked executable file for Linux has the name eurodirs.x and the version for Windows has the name eurodirs.exe.

Both executables will be built with the command euroasm eurodirs.htm.

Linux GUI version works with ANSI terminal in character pseudo graphic mode.

         EUROASM CPU=X64, Unicode=No, NoWarn=0563
         INCLUDE argument.htm     ; Assemble the module argument.htm.
↑ EuroDirs for Linux
         INCLUDE dirslinc.htm  ; Assemble the module dirslinc.htm (Linux console subsystem).
         INCLUDE dirsling.htm  ; Assemble the module dirsling.htm (Linux pseudographic subsystem).
eurodirs PROGRAM Format=ELFX, Width=64, Entry=MainCon
          LINK argument.obj, dirslinc.obj, dirsling.obj  ; Link three modules to the final eurodirs.x.
         ENDPROGRAM eurodirs
↑ EuroDirs for Windows
         INCLUDE dirswinc.htm  ; Assemble the module dirswinc.htm (Windows console subsystem).
         INCLUDE dirswing.htm  ; Assemble the module dirswing.htm (Windows graphic subsystem).
eurodirs PROGRAM Format=PE, Width=64, Entry=MainCon, Subsystem=con, IconFile=eurodirs.ico,
          LINK argument.obj, dirswinc.obj, dirswing.obj  ; Link three modules to the final eurodirs.exe.
         ENDPROGRAM eurodirs

▲Back to the top▲