The only issue is if you specify a directory without a filespec (e.g., c:\temp as opposed to c:\temp\*.*) and I would also like more spacing between the columns. 05:55:21 559 store\Documentation\Logs\Debug log.txt 05:55:20 52 store\Documentation\Temporary1.txt 05:55:20 176 store\Documentation\Temporary0.txt Showing all *.txt contained under C:\users\default\documents PS C:\> C:\utils\sdir.ps1 \users\default\documents\*.txt There are no totals at the end, but that's fine. Recursive with file fullname and a calculated property "MB Size" Get-ChildItem -Path "C:\files\*.txt" -Recurse | You can use get-childitem and select the file property values with or without using calculated properties to assist in getting the desired output values. echo Exporting: ' Selected Folder/Export-Directory-Listing.txt' cd 1 dir /a /b /-p /o:gen >'temp\Export-Directory-Listing.txt' echo. 02:07 AM 2,162,688 C:\files\\cache.sqlite echo Right-click on any folder in MS Windows Explorer and select echo 'Export Folder Listing' from Shortcut Menu to export it's contents echo to: ' Selected Folder/Export-Folder-Listing.txt'. I would like to know if the following example is possible using CMD (or if necessary, PowerShell): C:\files>dir cache.sqlite /s Currently, I can do: dir *.txt /sīut the list is not formatted well and is hard to use. For example, suppose I want to see the file sizes of all the *.txt files in a tree.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |