Batch File for Sorting Problem

December 26, 2011 at 11:36:05
Specs: Windows XP
I’m trying to create a batch file to sort all the files in a folder beginning with the 5th character of each file name. My .bat file includes the following syntax:

@ECHO off
dir /b | sort /+5
pause

When I run the bat file, a DOS screen appears with the files sorted the way I want, but now how do I get the actual Win XP files in my folder sorted the same way? I must be missing a piece of syntax.



See More: Batch File for Sorting Problem

Report •

#1
December 26, 2011 at 16:15:52
Sorting the directory listing does not sort the directory itself.

Report •

#2
December 26, 2011 at 21:10:16
Is there any way to sort the directory itself?

Report •

#3
December 27, 2011 at 03:24:10
There has not been a utility since Norton's dirsort for DOS which sorted in directory order.

Report •

Related Solutions

#4
December 27, 2011 at 16:17:35
Thanks for the help Wizard Fred

Report •

Ask Question