Simply open one, navigate to your folder and funnel the result into a text file using this command: dir > filenames.txt You will have to do some cleaning up, but as I said 'quick and dirty'. Where it says "Folder" for the Extension just it returning that it is a directory instead of a blank (No extension). 4 Answers Sorted by: 15 One very quick and dirty way is the command prompt. | New Text Document.txt | 19:21 | X:\Test\test2\New Text Document.txt |. First lets take the case of files that may only have commas in them. Its not too difficult to cope with these cases. Refer to the below syntax: Get-ChildItem 'Folder name or Path' -Recurse select FullName > list.txtThis will help you write all the plain files and folders names recursively onto a file called list.txt Refer to this for more information. | test2 | 19:21 | X:\Test\test2 | Folder | Double quotes and commas are special characters in CSV files, so if you try the above command on a directory containing files named using such characters, you wont get a valid CSV file. You can achieve this through the get-childitem command in PowerShell. | Name | Created | filePath | Extension | My results look like this in Excel: +-+-+-+-+ You will need to change your path, as I created this for a test. $Path | Select-Object Export-Csv X:\Test\Results.csv -NoTypeInformation I am also a little unsure of some of the information you wanted, but here is a script that does what you want mostly I believe and is IMO a little better to read. It will automatically go through all of the subdirectories of subdirectories. You don't need to recurse a recursive in Powershell.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |