How to make a list of files not using Mp3tag - and add a datestamp to it?

I need to make a list of all of the files for ma folder that has many sub-folders- in which there are many files

With a BAT like this

tree P:\YouTube /f > "C:\Archive\File List.txt"

I get a File List.txt in folder Archive on drive C. It is the minimum I need

The problem with this method are:

A] The TXT file gets overwritten every time I execute the BAT. I can work around that problem with a backup software, but I would prefer to have multiple TXT files in that folder, each with a date and [also maybe time] in its name when the list was created. So for example I would have something like File List 2019-11-01 12_00_00.txt, File List 2019-11-15 16_05_00.txt, ``File List 2020 01 17 23_00_06.txt` etc.

B] The TXT files have a nice graphical form of a tree. But diacritic signs are all massed up. And adding parameter /a [using ASCII instead of extended characters, whatever those extended ones are] does not fix that, but [if I am not mistaken] only changes the signs used for the drawing of the tree

So does anyone know what else I can use? To add the date and time to the TXT file and see in it all of the characters

see this external site:

Have a look at powershell as you are using Windows

Open a powershell window and navigate to your P:\YouTube directory
then run

Get-ChildItem -Recurse | Write-Output | Tee-Object -FilePath $("P:\YouTube\File List - "+[datetime]::Now.ToString("yyyy-MM-dd-HH-mm-ss")+".txt") | Out-Null

The above is all one line

They seem to get this done there, although it seems to be complicated

And because there is still the problem of diacritic sings, for now I will leave it alone

Nice, as the sub-folders are visually separated on the list and all the diacritic signs are present. But I also get all that excess of information in front of each Name, i.e. Mode, LastWriteTime, Length. And I would not know how to remove all of that info If I had to actually use that list. [I tried pasting it into spreadsheet in Excell but could not get them into separate columns]

So I tried coming up with a different code

Get-ChildItem -Recurse -Include *.* -Name | Write-Output | Tee-Object -FilePath $("P:\YouTube\File List "+[datetime]::Now.ToString("yyyy-MM-dd hh_MM_ss")+".txt") | Out-Null

With it I get a list, but this time it that has no visual separation between folders, which is a drawback. It has folders and sub-folders in front of Names, so I know I will be able to make a usage of such list- but it still would require then a lot of hand work from me if I actually had to use it. [The purpose of this list to be able to know what I want to watch again in the future in case if all of my backup copies will be inaccessible and my YouTube account will also be of no use or inaccessible]

And if I use a code like that

Get-ChildItem -Recurse -Include *.* | Format-Table name -hidetableheaders | Write-Output | Tee-Object -FilePath $("P:\YouTube\File List "+[datetime]::Now.ToString("yyyy-MM-dd hh_MM_ss")+".txt") | Out-Null

then the during the generation of the list it removes the directories thus turning the full-paths into just filenames and also not showing any of the excess information [Mode, LastWriteTime, Length]. Having just Names in a single line is exactly what I am after, but not having block of lines [i.e. content of directories] somehow separated and described with names of directories simply makes such list almost completely useless [as I do not know which video comes from which youtube channel]

So what I need is something that has a space structure like in the code presented by @Spider099 pider099 but limited in information to just the directories / sub-folders paths and the name filenames within each of them; some kind of combination of the first and the third code

Can it be done within PowerShell?

Yes it can
Try this - gives "path" then file Name

Get-ChildItem -Recurse -Include . | Format-Table directory, name -hidetableheaders | Write-Output | Tee-Object -FilePath $("m:\Music\File List "+[datetime]::Now.ToString("yyyy-MM-dd hh_MM_ss")+".txt") | Out-Null

if thats not what you want

Then show an example!