Computing.Net > Forums > Disk Operating System > List file names without extensions

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

List file names without extensions

Reply to Message Icon

Name: Dinesh.v.u
Date: October 6, 2004 at 05:01:41 Pacific
OS: Windows 2000
CPU/Ram: P IV
Comment:

Hi,
I want to know how to list all file names in a given directoy without their extensions.

dir *.* /b gives the file names with extensions

Regards
Dinesh




Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: October 6, 2004 at 06:59:00 Pacific
Reply:

The following compound statement achieves what you wish; it is better suited for a batch script, but you can type it at the prompt

For %a in (*.*) do @echo %~na

Change your current folder to the one you want to list before typing and if you want to embed the command into a batch, replace % with %%.

By the way that is NT NOT DOS and so it works under NT/2K/XP only.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: List file names without extensions

Batch to find line of text www.computing.net/answers/dos/batch-to-find-line-of-text/13613.html

Long File Names In Dos www.computing.net/answers/dos/long-file-names-in-dos/7110.html

Long file name support in DOS-95? www.computing.net/answers/dos/long-file-name-support-in-dos95/2424.html