Click here to Skip to main content
13,000,469 members (59,924 online)
Click here to Skip to main content
Add your own
alternative version

Stats

51.9K views
282 downloads
32 bookmarked
Posted 3 Apr 2004

Catalog Now!

, 10 Apr 2004
Rate this:
Please Sign up or sign in to vote.
Track all your files, locally, on CD-ROMs, and on removables.

Sample Image - catalognow.jpg

Introduction

Track all your files, locally, on CD-ROMs, and on removables. Then take these tiny catalogs with you, along with 'Catalog Now'!

Using the program

The main goal is the serialization of the following classes:

[Serializable()]
public class DirectoryCollection: SortedList
{
  public DirectoryCollection() : base() {}
  public DirectoryCollection(IDictionary c) : base(c) {}
}

[Serializable()]
public class FilesCollection: SortedList
{
  public FilesCollection() : base() {}
  public FilesCollection(IDictionary c) : base(c) {}
}

[Serializable()]
public class DirectoryItem
{
  public DirectoryCollection subdir;
  public FilesCollection files;
  public string Name;
  public string Comment;
  public bool isCompressed = false;
  public DirectoryItem(string name)
  {
    Name = name;
    files = new FilesCollection();
    subdir = new DirectoryCollection();
  }
  public DirectoryItem(string name, bool iscompressed)
  {
    Name = name;
    isCompressed = iscompressed;
    files = new FilesCollection();
    subdir = new DirectoryCollection();
  }
}

[Serializable()]
public class FileItem
{
  public string Name;
  public long Size;
  public DateTime Date;
  public string Comment;
  public FileItem(string name, long size, DateTime date)
  {
    Name = name;
    Size = size;
    Date = date;
  }
  public FileItem(string name, long size, DateTime date, string comment)
  {
    Name = name;
    Size = size;
    Date = date;
    Comment = comment;
  }
}

[Serializable()]
public class CatalogVersion
{
  public string Version = "1.0";
}

[Serializable()]
public class CatalogHeader
{
  public string VolumeName;
  public string VolumeSerialNumber;
  public uint DriveType;
  public ulong Size;
  public ulong FreeSpace;
  public DateTime DateofScan;
}

With the BinaryFormatter and the ICSharpCode.SharpZipLib.dll component, we can compress the catalog.

The scan of the devices is done with the optional read of compressed (.zip) files.

Sample screenshot

In order to look for a specific file, it is possible to look by name, commentary, date, size, etc.

Enjoy it!.

Credits

  • Thanks to Mike Krueger for his works with his #ziplib (SharpZipLib, formerly NZipLib, Zip, GZip, Tar and BZip2 library written entirely in C#).

History

  • 05/04/2004: Fix of permission bugs.
  • 04/04/2004: Initial version.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

sergiols
Web Developer
Argentina Argentina
No Biography provided

You may also be interested in...

Comments and Discussions

 
GeneralCatalog Now moved Pin
sergiols18-Jan-05 11:58
membersergiols18-Jan-05 11:58 
GeneralRe: Catalog Now moved Pin
JorgeCordero4-Aug-06 18:21
memberJorgeCordero4-Aug-06 18:21 
GeneralGreat tool Pin
sebasong1017-Aug-04 19:35
membersebasong1017-Aug-04 19:35 
GeneralGrande mono Pin
Gargolan28-Apr-04 17:22
memberGargolan28-Apr-04 17:22 
GeneralGenial!!! Pin
Markust6-Apr-04 5:07
memberMarkust6-Apr-04 5:07 
GeneralRe: Genial!!! Pin
sergiols6-Apr-04 12:15
membersergiols6-Apr-04 12:15 
GeneralProgram to help with your CD collection. Pin
Anonymous5-Apr-04 7:45
sussAnonymous5-Apr-04 7:45 
GeneralRe: Program to help with your CD collection. Pin
sergiols5-Apr-04 8:13
membersergiols5-Apr-04 8:13 
GeneralDirectory Permission Pin
Simon Wren5-Apr-04 1:14
memberSimon Wren5-Apr-04 1:14 
GeneralRe: Directory Permission Pin
sergiols5-Apr-04 2:38
membersergiols5-Apr-04 2:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170624.1 | Last Updated 11 Apr 2004
Article Copyright 2004 by sergiols
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid