Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal enabledelayedexpansion
- set "output=_List.txt"
- rem Loop through each file in the current directory
- for %%F in (*) do (
- set "file=%%F"
- rem Get the size of the file
- for %%A in ("!file!") do set "size=%%~zA"
- rem Append the file name and size to the output file
- echo !file! - !size! bytes>> "%output%"
- )
- echo List generated and saved as "%output%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement