Windows DIR analogue of ls -v

1

In linux, ls -v returns a file list in a "natural sort" order -- that is, when the name has a numerical part, it is sorted as a number:

file1.txt
file2.txt
file11.txt

Is there a way to straightforwardly replicate that output under a standard Windows 7 installation (that is, without Powershell or any other extra tools installed)?

laxxy

Posted 2016-04-06T23:24:50.907

Reputation: 111

2Why are you ruling out PowerShell? It comes with Windows (it is not an extra tool to be installed). – DavidPostill – 2016-04-06T23:47:25.530

3

PowerShell solution here How to sort by file name the same way Windows Explorer does?

– DavidPostill – 2016-04-06T23:58:47.637

@DavidPostill; Probably because Win7 does not include PowerShell out-of-the-box. It's an installable feature but not every Win7 box has it. – Wes Sayeed – 2016-04-07T00:22:46.617

2

@WesSayeed "PowerShell 2.0 is integrated with Windows 7 and Windows Server 2008 R2 and is released for Windows XP with Service Pack 3, Windows Server 2003 with Service Pack 2, and Windows Vista with Service Pack 1". Source Windows PowerShell

– DavidPostill – 2016-04-07T00:31:02.837

3

@WesSayeed "You do not have to download Windows PowerShell 2.0 if you have Windows 7 because it is already installed." Source Install Windows PowerShell on Windows 7

– DavidPostill – 2016-04-07T00:32:51.143

1I stand corrected. I thought Win7 it had to be added with the Windows Features dialog but was disabled by default. – Wes Sayeed – 2016-04-07T00:59:56.333

I see, thanks! I had in fact incorrectly thought that it was not pre-installed, good to know! One remaining problem is that on the machines it needs to run it the powershell script execution seems to be disabled by default. In this specific case though, they will have perl, so I think I'll just use that. – laxxy – 2016-04-07T01:36:44.973

No answers