Re: Looping
From: David Trimboli (trimboli_at_cshl.edu)
Date: 12/22/04
- Previous message: Keith O'Connell: "Re: Novice Script Question"
- In reply to: Franck Diastein: "Looping"
- Next in thread: Davíð Víðisson: "Re: Looping"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 22 Dec 2004 11:59:10 -0500
Franck Diastein wrote:
> Hi,
>
> I want to list files in a directory, how to do it ?
>
> If I do this:
>
> for %%f in (c:\svn_bak\dumps\*.*) do echo %%f
>
> I have files with full path... I only need file names...
>
> TIA
Umm . . .
dir /a-d /b c:\svn_bak\dumps
Or, if you actually do need only files with "." in them:
dir /a-d /b c:\svn_bak\dumps\*.*
If you want to list directories too, choose one of these:
dir /b c:\svn_bak\dumps
dis /b c:\svn_bak\dumps\*.*
Unless I'm missing some point you were trying to make? Why are you
using FOR?
David
Stardate 4976.6
- Previous message: Keith O'Connell: "Re: Novice Script Question"
- In reply to: Franck Diastein: "Looping"
- Next in thread: Davíð Víðisson: "Re: Looping"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|