>Vilius Mockûnas wrote: >> How do I sort this collection by name by date and etc. >> I can build sort logic of course but maybe there are easy standard ways ?
>Several years ago, Mike Harris wrote a Shell Sort and a >quick sort in (vb)script. He posted the result here, >(vbs ng) and on Clarence Washington's website:
>A while back, Clarence stopped maintaining his website, >thanks to the introduction of "a-little-bundle-of-joy" >into his life (which now consumes all his spare time). >And, when last seen, he was closing his site. However, >nothing ever disappears from the web, and MikHar's sort >routines are probably still out there in some archival >site or other.
In mayayana site there is a zip with several sorting code. www.jsware.net
A list of files can be sorted using the switches of the dir command and redirecting the output. Or shell a sort command on the list (sort by name only).
-- Giovanni Cenati (Bergamo, Italy) Write to "Reventlov" at katamail com http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) --
I know this is a bit off thread, as this is just in normal Windows usage, but I use the current ISO date/time string (yy;MM;ddthh;mm;ss) as a unique identifier, pasting it before the file name, for any files I want to keep in the order I filed them or received them (usually work related).
In microsoft.public.scripting.vbscript message <22f6f6d408818bb58f99a98c 2b24a...@nntp-gateway.com>, Sun, 1 Nov 2009 20:36:45, tonyb <gu...@unknown-email.com> posted:
>I know this is a bit off thread, as this is just in normal Windows >usage, but I use the current ISO date/time string (yy;MM;ddthh;mm;ss) as >a unique identifier, pasting it before the file name, for any files I >want to keep in the order I filed them or received them (usually work >related).
I do not see where ISO 8601:2004 allows either a two-digit year or a semicolon as separator. While the first two digits of the year will not change soon, they do serve to indicate that the field order is not MDY of DMY, and is probably YMD.
-- (c) John Stockton, nr London, UK. ?...@merlyn.demon.co.uk Turnpike v6.05. Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.
> In microsoft.public.scripting.vbscript message <22f6f6d408818bb58f99a98c > 2b24a...@nntp-gateway.com>, Sun, 1 Nov 2009 20:36:45, tonyb > <gu...@unknown-email.com> posted:
>>I know this is a bit off thread, as this is just in normal Windows >>usage, but I use the current ISO date/time string (yy;MM;ddthh;mm;ss) as >>a unique identifier, pasting it before the file name, for any files I >>want to keep in the order I filed them or received them (usually work >>related).
> I do not see where ISO 8601:2004 allows either a two-digit year or a > semicolon as separator. While the first two digits of the year will not > change soon, they do serve to indicate that the field order is not MDY > of DMY, and is probably YMD.
Dr. J., I am surprised, and even a bit shocked, to see you being almost an apologist for a practice that has no particular justification ;-)
We relied on a similar trick in the previous century, during most of which the two digit year would invariably be greater than the largest possible day of month number. You may recall the name of the phenomenon that occurred when it finally dawned on us that we were, effectively, planning our own obsolescence. Kind of like my mother in law who back in the 1990's had a tombstone sculpted for herself with the first two digits of the date of death being pre-carved as "19". A common, and even practical, practice earlier in the century. Apparently the few who were born in the 1890's and who lived into the 21st century thought better of the idea and left the slate completely blank as long as they could.
In microsoft.public.scripting.vbscript message <#F#E5xQXKHA.4688@TK2MSFT NGP06.phx.gbl>, Tue, 3 Nov 2009 22:05:48, Al Dunbar <aland...@hotmail.com> posted:
>"Dr J R Stockton" <reply0...@merlyn.demon.co.uk> wrote in message >news:Vyslo1P9mG8KFwSy@invalid.uk.co.demon.merlyn.invalid... >> In microsoft.public.scripting.vbscript message <22f6f6d408818bb58f99a98c >> 2b24a...@nntp-gateway.com>, Sun, 1 Nov 2009 20:36:45, tonyb >> <gu...@unknown-email.com> posted:
>>>I know this is a bit off thread, as this is just in normal Windows >>>usage, but I use the current ISO date/time string (yy;MM;ddthh;mm;ss) as >>>a unique identifier, pasting it before the file name, for any files I >>>want to keep in the order I filed them or received them (usually work >>>related).
>> I do not see where ISO 8601:2004 allows either a two-digit year or a >> semicolon as separator. While the first two digits of the year will not >> change soon, they do serve to indicate that the field order is not MDY >> of DMY, and is probably YMD.
>Dr. J., I am surprised, and even a bit shocked, to see you being almost >an apologist for a practice that has no particular justification ;-)
Attribute it to a lack of understanding on your own part.
-- (c) John Stockton, Surrey, UK. ?...@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036) Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
I must accept your castigation for not having done my homework properly. The year in ISO format should indeed have 4 digits. Unfortunately, although the correct seperator is a colon, windows does not allow this in file names!
In microsoft.public.scripting.vbscript message <a770c07dcdb529f6d921d8db 0eb9a...@nntp-gateway.com>, Fri, 6 Nov 2009 10:12:59, tonyb <gu...@unknown-email.com> posted:
>I must accept your castigation for not having done my homework >properly. >The year in ISO format should indeed have 4 digits. Unfortunately, >although the correct seperator is a colon, windows does not allow this >in file names!
The correct time separator is a colon.
You can use - between the date fields and _ between the time fields.
Probably better to use the compact ISO date and time forms YYYYMMDD and hhmmss, and to put a minus between them - 20091107-181247etc.etc .
-- (c) John Stockton, Surrey, UK. ?...@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036) Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
> In microsoft.public.scripting.vbscript message <#F#E5xQXKHA.4688@TK2MSFT > NGP06.phx.gbl>, Tue, 3 Nov 2009 22:05:48, Al Dunbar > <aland...@hotmail.com> posted:
>>"Dr J R Stockton" <reply0...@merlyn.demon.co.uk> wrote in message >>news:Vyslo1P9mG8KFwSy@invalid.uk.co.demon.merlyn.invalid... >>> In microsoft.public.scripting.vbscript message <22f6f6d408818bb58f99a98c >>> 2b24a...@nntp-gateway.com>, Sun, 1 Nov 2009 20:36:45, tonyb >>> <gu...@unknown-email.com> posted:
>>>>I know this is a bit off thread, as this is just in normal Windows >>>>usage, but I use the current ISO date/time string (yy;MM;ddthh;mm;ss) as >>>>a unique identifier, pasting it before the file name, for any files I >>>>want to keep in the order I filed them or received them (usually work >>>>related).
>>> I do not see where ISO 8601:2004 allows either a two-digit year or a >>> semicolon as separator. While the first two digits of the year will not >>> change soon, they do serve to indicate that the field order is not MDY >>> of DMY, and is probably YMD.
>>Dr. J., I am surprised, and even a bit shocked, to see you being almost >>an apologist for a practice that has no particular justification ;-)
> Attribute it to a lack of understanding on your own part.
My apologies, however, it was more a lack of interpretation on my part than understanding. To me it's not the value of digits in the year that indicate the YMD order, but the fact that there are more than two of them, plus the fact that YDM is the least likely order possible.