Quantcast
Channel: Programmers Heaven Forums RSS Feed
Viewing all articles
Browse latest Browse all 2703

Ordering cross-directories

$
0
0
Hi,
I need your help.
I want to iterate over directories and order all the files found by date.

I have used this command:

cmd /c dir " c:\nuovacartella " /b /s /A /o:-d

but the files are ordered at folder level.

See the example:

C:\>cmd /c dir "c:\nuovacartella" /b /s /A /tc /o:d
c:\nuovacartella\cartella file\uno.txt
c:\nuovacartella\cartella file\AAA\ciao.txt
c:\nuovacartella\cartella file\AAA\due.doc
c:\nuovacartella\cartella file\AAA\tre.xsl
c:\nuovacartella\cartella file\AAA\appenaCreato.rar
c:\nuovacartella\cartella file\BBB\B2\son un file.txt
c:\nuovacartella\cartella Link\son un file
c:\nuovacartella\cartella Link\uno
c:\nuovacartella\cartella Link\appenaCreato
c:\nuovacartella\cartella Link\ciao

C:\>cmd /c dir "c:\nuovacartella" /b /s /A /tc /o:-d
c:\nuovacartella\cartella file\uno.txt
c:\nuovacartella\cartella file\AAA\appenaCreato.rar
c:\nuovacartella\cartella file\AAA\tre.xsl
c:\nuovacartella\cartella file\AAA\due.doc
c:\nuovacartella\cartella file\AAA\ciao.txt
c:\nuovacartella\cartella file\BBB\B2\son un file.txt
c:\nuovacartella\cartella Link\ciao
c:\nuovacartella\cartella Link\appenaCreato
c:\nuovacartella\cartella Link\uno
c:\nuovacartella\cartella Link\son un file

but I want the files ordered cross-folder.
Is there a way to do this (for example, using a batch script)?

Thanks in advance. Leonardo


Viewing all articles
Browse latest Browse all 2703

Trending Articles