Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need file names

Status
Not open for further replies.

desanti

Programmer
Jul 9, 2004
51
0
0
US
Hi; i wish to find files on my hard drive(c:) that have an
extension of .MP3(.mp3).that includes directories and files.
i have tried some things but they do not work.i thought
FILENAME option with some info would get if for me but it does not.i do not want to use "find" in windows.thank you
 
dir c:\*.mp3 /B /S

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi; thanx for the input but i did not make myself clear.i want to do it with AWK or UNIX(?).i have done it with dir.
 
i want to do it with AWK or UNIX(?)
On which platform are you ?
I guessed Windows (on my hard drive(c:))
What do you want to do ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi; you are right i am in a windows98se os.but i have the ability to use awk and sed(ksh).i have used awk and sed many times.all i wish to do is access my c: drive and find all files with an .mp3 extension.it is easy to do if i go to the folder where i know where the mp3 files are.but if they are scattered i want a listing of them without having to change directories.that is about as clear as i can make it.thanx for your time.
 
Have you tried my suggestion ?
No need of awk nor ksh:
dir C:\*.mp3 /B/S

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
awk doesn't really do that kind of stuff. awk is for processing text files or streams

you could pipe a dir /s listing to awk and look for mp3 in the produced list if you really want to, but that's just doing it the hard way...

I'd use PHV's suggestion...



HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top