Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dir /b /s /a:-D > results.txt
- C:UsersMartinPicturesTableoriginalPC120013.JPG 227298
- C:UsersMartinPicturesTableoriginalPC120014.JPG 123234
- C:UsersMartinPicturesTableoriginalPC120015.JPG 932344
- @echo off & for /f %a in ('dir /s /b') do echo %~fa %~za
- In addition, substitution of FOR variable references has been enhanced.
- You can now use the following optional syntax:
- %~I - expands %I removing any surrounding quotes (")
- %~fI - expands %I to a fully qualified path name
- %~dI - expands %I to a drive letter only
- %~pI - expands %I to a path only
- %~nI - expands %I to a file name only
- %~xI - expands %I to a file extension only
- %~sI - expanded path contains short names only
- %~aI - expands %I to file attributes of file
- %~tI - expands %I to date/time of file
- %~zI - expands %I to size of file
- %~$PATH:I - searches the directories listed in the PATH
- environment variable and expands %I to the
- fully qualified name of the first one found.
- If the environment variable name is not
- defined or the file is not found by the
- search, then this modifier expands to the
- empty string
- The modifiers can be combined to get compound results:
- %~dpI - expands %I to a drive letter and path only
- %~nxI - expands %I to a file name and extension only
- %~fsI - expands %I to a full path name with short names only
- %~dp$PATH:I - searches the directories listed in the PATH
- environment variable for %I and expands to the
- drive letter and path of the first one found.
- %~ftzaI - expands %I to a DIR like output line
- @echo off & for /R "c:deletelaterfolder with spaces" %A in (*.*) do echo %~fA %~zA
- @echo off & for /R "c:deletelater" %A in (*.*) do echo %~fA %~zA
- c:DeleteLaterName with Spaces.txt 19800676
- c:DeleteLaterNoSpacesLongName.txt 21745440
- c:DeleteLaterFolder with Spaces2nd Name with Spaces.txt 5805492
- c:DeleteLaterFolder with Spaces2ndNoSpacesLongName.txt 3870322
- c:DeleteLaterFolderNoSpaces3rd Name with Spaces.txt 27874695
- c:DeleteLaterFolderNoSpaces3rdNoSpacesLongName.txt 28726032
- @echo off & for /f "delims=*" %A in ('dir /s /b') do echo %~fA %~zA
- @echo Results on %DATE% for %CD% >> YourDirFile.txt & echo off & for /f "delims=*" %A in ('dir /s /b /a:-d') do echo %~fA %~zA >> YourDirFile.txt
- @echo off & for /f %A in ('dir /s /b /a:-d') do echo %~zA %~fA %~zA
- C:DeleteLaterName
- 21745440 C:DeleteLaterNoSpacesLongName.txt 21745440
- C:DeleteLaterFolder
- C:DeleteLaterFolder
- C:DeleteLaterFolderNoSpaces3rd
- 28726032 C:DeleteLaterFolderNoSpaces3rdNoSpacesLongName.txt 28726032
- @echo off & for /f "delims=*" %A in ('dir /s /b /a:-d') do echo %~fA %~zA
- C:DeleteLaterName with Spaces.txt 19800676
- C:DeleteLaterNoSpacesLongName.txt 21745440
- C:DeleteLaterFolder with Spaces2nd Name with Spaces.txt 5805492
- C:DeleteLaterFolder with Spaces2ndNoSpacesLongName.txt 3870322
- C:DeleteLaterFolderNoSpaces3rd Name with Spaces.txt 27874695
- C:DeleteLaterFolderNoSpaces3rdNoSpacesLongName.txt 28726032
- FORFILES /S /M *.doc /C "cmd /c echo @fsize"
- FORFILES /M *.txt /C "cmd /c if @isdir==FALSE notepad.exe @file"
- forfiles /s /c "cmd /c if @isdir==FALSE echo @path @fsize" >>ForfilesOut.txt
- forfiles /s /c "cmd /c if @isdir==FALSE echo @path @fsize"
- "c:DeleteLaterName with Spaces.txt" 19800676
- "c:DeleteLaterNoSpacesLongName.txt" 21745440
- "c:DeleteLaterFolder with Spaces2nd Name with Spaces.txt" 5805492
- "c:DeleteLaterFolder with Spaces2ndNoSpacesLongName.txt" 3870322
- "c:DeleteLaterFolderNoSpaces3rd Name with Spaces.txt" 27874695
- "c:DeleteLaterFolderNoSpaces3rdNoSpacesLongName.txt" 28726032
- "c:DeleteLaterMoreFilesA really really long file name that goes on and on 123456789 asdfghjkl zxcvnm qwertyuiop and still A really really long file name that goes on and on 123456789 qwertyuiop and still further roughly 225 characters by now.txt" 447
- "c:DeleteLaterMoreFilesNew Text Document no extension" 0
- sfk cwd +run -yes "sfk list -size -tab $qfile +toclip"
- sfk fromclip > C:_tempsfk_list_output.txt
- (for /R "pathtodirectory" %A in (*.*) do echo %~fA %~zA) | findstr /v "echo"
- D:UsersNatasha>(for /R "." %A in (*.*) do echo %~fA %~zA) | findstr /v "echo"
- D:UsersNatashaFlowers_ (12).jpg 118886
- D:UsersNatashaSomeFolderdata.txt 1241
- D:UsersNatashaSomeFolderCSCounter-Strike_1.6.exe 272645624
- du -ah "C:your_dir" > "C:file_list.txt"
- 15 C:your_dir/.htaccess
- 608 C:your_dir/folder/hello.txt
- 1.0 C:your_dir/folder/subfolder/test.txt
- 1.0 C:your_dir/folder/subfolder
- 1.2M C:your_dir/folder/world.txt
- 1.2M C:your_dir/folder
- 9.0 C:your_dir/no_file_ending
- 11 C:your_dir/sample document 1.txt
- 684K C:your_dir/sample document 2 - äöüßÄÖÜáà.txt
- 1.9M C:your_dir
Add Comment
Please, Sign In to add comment