winzip icon

Pretty File Names v2.2 - Final 2-16-08

Email
Submitted on: 2/14/2015 8:53:00 AM
By: Rde (from psc cd)  
Level: Intermediate
User Rating: By 12 Users
Compatibility: VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 929
 
     Hi again all. This module will sort string array items of file paths which may contain numeric characters in a more natural order. I created this in response to a comment made on a previous submission. It is complete with demo and sample files so you can easily load and sort to see the results of the different settings available. ++++++++++++++++++++++++++++++++++++++++++++++++ It is intended for sorting file names, and will apply the same intuitive order for folders in the file path if they contain numeric characters. It will take into account all occurences of numbers in the string item including in the extension. ++++++++++++++++++++++++++++++++++++++++++++++++ Specifying a path is not required, neither do they need to have extensions, in fact, they do not need to be file names at all; just strings that may contain numeric characters within the string text. In other words, it can be used for normal pretty-sorting operations as well. But please note, this is intended for sorting file names and is a little slower than the included Pretty Number Sorter because of extra code to handle the extensions. ++++++++++++++++++++++++++++++++++++++++++++++++ It can order the items by extension, whilst still producing an intuitive order of the file path and names that may have numbers within them and that have the same extension. Or you can group by folder but still include extensions in the comparisons without grouping by them. ++++++++++++++++++++++++++++++++++++++++++++++++ Also included is a compare function that can be used in place of VB's StrComp that will order the filename items it compares based on the settings described above. It does not sort an array of items but compares just two items and returns the result. ++++++++++++++++++++++++++++++++++++++++++++++++ This is version 2 (2-5-08) in response to a request to add the handling of numbers in the extension. Bug Fix update 2-6-08. ++++++++++++++++++++++++++++++++++++++++++++++++ Version 2.1 (2-7-08) adds Indexed versions of my Pretty Sorters. Included in this module: strPrettyFileNames, strPrettyFileNamesIndexed, StrCompFileNames, strPrettyNumSort, strPrettyNumSortIndexed, StrCompNumbers, strPrettySort, strPrettySortIndexed, ValidateIdxArray, strStableSort2Indexed, strSwapSort4Indexed, InitedArray ++++++++++++++++++++++++++++++++++++++++++++++++ Update (2-8-08) removed the 260 character limit on the three file name routines. ++++++++++++++++++++++++++++++++++++++++++++++++ Update (2-15-08) with latest and final version of Stable QuickSort v2.2. ++++++++++++++++++++++++++++++++++++++++++++++++ Update (2-16-08) I just had to fix a design weakness. Removed the requirement to initialize the index array before passing to the indexed sorters. Final number 2! ++++++++++++++++++++++++++++++++++++++++++++++++

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com


Other 30 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

9/26/2015 2:09:26 PMJonxvel

Great code. Congratulations.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.