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.