Hi all,

Is there any way to have the DIR function in Visual Basic 6, return the
file list in Sorted Order? I could do it internally, but about twice a year
I could have upwards of 5000 files to sort.

--
Tim

Re: The DIR function by Gabriel

Gabriel
Mon Sep 13 10:55:31 CDT 2004

Shell "%COMSPEC% /C DIR *.* /B /BN >c:\output.txt"



"Tim Munro" <Excelsiot@Liamtoh.moc> escreveu na mensagem
news:%23Xplr9ZmEHA.2180@TK2MSFTNGP12.phx.gbl...
> Hi all,
>
> Is there any way to have the DIR function in Visual Basic 6, return the
> file list in Sorted Order? I could do it internally, but about twice a
> year I could have upwards of 5000 files to sort.
>
> --
> Tim
>



Re: The DIR function by John

John
Mon Sep 13 12:30:17 CDT 2004

>> Is there any way to have the DIR function in Visual Basic 6,
>> return the file list in Sorted Order? I could do it internally, but
>> about twice a year I could have upwards of 5000 files to sort.

> Shell "%COMSPEC% /C DIR *.* /B /BN >c:\output.txt"

<MyScreen>

E:\Temp\Script>DIR *.* /B /BN 1>c:\output.txt"
Parameter format not correct - "BN".

<\MyScreen>

Maybe better use of DOS command here is this syntax :

DIR|SORT>Output.txt

(For details how to adjust the command, open a DOS window and type DIR /?)

No idea how to use this with Visual Basic 6 though, sure you're in the right
newsgroup?

JB



Re: The DIR function by Tim

Tim
Mon Sep 13 14:33:11 CDT 2004

Using DOS, to get the file names (only files) in sorted order is "DIR
/a-d /b /on *.*>somefilename.txt", and then read the file. I was hopeing to
use the internal DIR function of VB. I think I may be out of luck here.

Thanks to those who responded.

--
Tim

"Gabriel" <gsouth@hotmail.com> wrote in message
news:uQlhQpamEHA.2372@TK2MSFTNGP10.phx.gbl...
> Shell "%COMSPEC% /C DIR *.* /B /BN >c:\output.txt"
>
>
>
> "Tim Munro" <Excelsiot@Liamtoh.moc> escreveu na mensagem
> news:%23Xplr9ZmEHA.2180@TK2MSFTNGP12.phx.gbl...
>> Hi all,
>>
>> Is there any way to have the DIR function in Visual Basic 6, return
>> the file list in Sorted Order? I could do it internally, but about twice
>> a year I could have upwards of 5000 files to sort.
>>
>> --
>> Tim
>>
>
>



Re: The DIR function by Gabriel

Gabriel
Tue Sep 14 10:29:56 CDT 2004

Sorry, was /ON

Type DIR /? for all switches...

Gabriel.


"Gabriel" <gsouth@hotmail.com> escreveu na mensagem
news:uQlhQpamEHA.2372@TK2MSFTNGP10.phx.gbl...
> Shell "%COMSPEC% /C DIR *.* /B /BN >c:\output.txt"
>
>
>
> "Tim Munro" <Excelsiot@Liamtoh.moc> escreveu na mensagem
> news:%23Xplr9ZmEHA.2180@TK2MSFTNGP12.phx.gbl...
>> Hi all,
>>
>> Is there any way to have the DIR function in Visual Basic 6, return
>> the file list in Sorted Order? I could do it internally, but about twice
>> a year I could have upwards of 5000 files to sort.
>>
>> --
>> Tim
>>
>
>