How do I recursively list filenames (only) in DOS/Windows?
--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Light Drops
--
Chapters
00:00 How Do I Recursively List Filenames (Only) In Dos/Windows?
00:33 Accepted Answer Score 34
00:57 Answer 2 Score 3
01:19 Answer 3 Score 8
01:30 Answer 4 Score 5
01:48 Thank you
--
Full question
https://superuser.com/questions/344155/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windowsxp #commandline #filenames #dir
#avk47
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Light Drops
--
Chapters
00:00 How Do I Recursively List Filenames (Only) In Dos/Windows?
00:33 Accepted Answer Score 34
00:57 Answer 2 Score 3
01:19 Answer 3 Score 8
01:30 Answer 4 Score 5
01:48 Thank you
--
Full question
https://superuser.com/questions/344155/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windowsxp #commandline #filenames #dir
#avk47
ACCEPTED ANSWER
Score 34
cd /d C:\Path\To\Source\Folder
for /r %i in (*) do @echo %~ni
If you need the list saved to a file, append >> C:\Path\To\list_file.txt
to the end of the for
command.
If you end up wanting the extensions, change %~ni
to %~nxi
To use in a batch file, change all the %
to %%
ANSWER 2
Score 8
If you are willing to load powershell, this command should do it.
get-childitem "d:\acc" -recurse|foreach {$_.Basename}
ANSWER 3
Score 5
Doing something like the following should get you what you want:
@for /f "delims=" %a in ('Dir /s /b %systemdrive%') do echo %~na
Just pipe the output to a file and use it from there if needed.
ANSWER 4
Score 3
Don't know if you'd consider it a 3rd party software or not since it's form Microsoft and ships with 7, but powershell will solve most of your problem pretty easily. If you haven't already installed it, it's available for XP on Microsoft's site.
Get-ChildItem -path "C:\Program Files\" -recurse | foreach ($_) {
write $_.name
}