Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 10777

Windows CMD or Power Shell generate list of files in a folder automatically use the name of the folder as the text file name?

$
0
0

To produce a list of file names inside a folder and save those names in a txt file, in windows explorer I navigate to the folder and in the address bar I type 'CMD' which opens the 'CMD' shellin the folder concerned

I then type DIR /b> List.txt

Is there a way to have CMD use the name of the folder automatically as the text file name?

If this is not possible in 'CMD' shell could it be down in Power Shell?

I have searched microsoft [dot] com/en-us/windows-server/administration/windows-commands/dir and google but found nothing helpful.


Viewing all articles
Browse latest Browse all 10777

Trending Articles