ZTree.com  | ZEN  | About...  

 Index   Back

[OT] Batch file sorting help   [OT]

By: Paul Laufer       
Date: Mar 20,2024 at 23:48

Can anyone figure out how to sort a fixed width file like this one by date using only batch commands on Windows 10/11?

I need to sort by date, which is bytes 7-10, then 1-5. Messing with regional settings is not an option. Ultimately this is the result of a line like this:

DIR /S /TW /4 /Q /OD C:\USERS\*.OST >%TEMP%\LookingForOST.TXT


03/08/2024 09:57 AM 917,479,424 DOMAIN\User01 user01@ourdomain.com - Yadda365.ost
09/23/2023 07:03 PM 2,101,682,176 DOMAIN\User02 user02@ourdomain.com - Yadda365.ost
03/09/2024 11:40 PM 2 917,479,424 DOMAIN\User03 user03@ourdomain.com - Yadda365.ost
03/09/2024 07:54 PM 2,117,626,368 DOMAIN\User04 user04@ourdomain.com - Yadda365.ost
03/07/2024 07:27 PM 2 650,616,832 DOMAIN\User05 user05@ourdomain.com - Yadda365.ost
03/08/2024 10:52 AM 2,317,773,312 DOMAIN\User06 user06@ourdomain.com - Yadda365.ost
01/15/2023 07:36 PM 2 767,369,216 DOMAIN\User07 user07@ourdomain.com - Yadda365.ost
12/19/2023 02:39 PM 2 767,369,216 DOMAIN\User08 user08@ourdomain.com - Yadda365.ost
01/20/2024 02:30 AM 2 650,616,832 DOMAIN\User09 user09@ourdomain.com - Yadda365.ost
01/07/2024 07:40 AM 1,201,020,928 DOMAIN\User10 user10@ourdomain.com - Yadda365.ost

596 views      
 

Messages in this Thread

 
96,640 Postings in 12,231 Threads, 350 registered users, 64 users online (0 registered, 64 guests)
Index | Admin contact |   Forum Time: Apr 12, 2024 - 1:52 pm UTC  |  Hits:62,817,421  (12,952 Today )
RSS Feed