Sure, that is actually a great idea as it's not trivial...
- press F9
- choose Customize...
- click somewhere in the white Menu Contents area
- press Insert to add a new entry
- type Copy properties as its name and press Enter
- at Command, type setlocal
- at Arguments, paste this:
Code: Select all
ENABLEDELAYEDEXPANSION&(if "!SA!"=="" set SA="%TEMP%\sa%RANDOM%")&for %%A in ("$(FullName)") do echo %%~aA;%%~tA;%%~zA;%%~A>>!SA!&clip<!SA!
- leave Execute through shell (and Show item in User Menu bar) checked
- uncheck the Open shell window check box
- click OK
This
User Menu entry copies the properties of the selected files/folders to the clipboard: attributes, date/time (without seconds), size (in bytes) and full filename. Use it by selecting some files/folders (in the
Find list), pressing
F9 and choosing
Copy properties. Then paste the properties into Notepad or Excel or wherever you need it.
For very large selections it might take a few seconds or even minutes until everything is on the clipboard.
Some explanation:
setlocal ENABLEDELAYEDEXPANSION is
necessary for the
!SA! variable to work. A random temporary filename is made up (in the first iteration only). Then
for enables the
%~ (enhanced variable substitution, try
FOR /?), which is used to add the properties to the file. The complete file is then copied to the clipboard using the
clip command. This whole procedure will be repeated for every selected file/folder, so in the end the clipboard contains all echoed lines.
This forum changes
TAB characters into spaces so I separated the properties by semicolons (;) instead. To get
TABs for easy pasting into Excel, just copy a
TAB to the clipboard once (e.g. in Notepad) and paste it over every semicolon in the
Arguments you just configured.
If you need the time to include seconds (but no attributes), paste this into
Arguments instead (and change the
;s into
TABs again):
Code: Select all
ENABLEDELAYEDEXPANSION&(if "!SA!"=="" set SA="%TEMP%\sa%RANDOM%")&forfiles /p "$(FullPath)." /m "$(Name)" /c "cmd /c echo @fdate @ftime;@fsize;@path"|findstr /r /v /c:"^$$">>!SA!&clip<!SA!