I have found this a very useful solution.
Note that copying long lists of files can take some seconds or even minutes, but it does work. Don't copy anything else to the clipboard while waiting: the clipboard will be overwritten anyway.
File list export from Find Files & Directories
Re: File list export from Find Files & Directories
If you also need the 'seconds' part of the file modification time (in Windows Vista or newer) you might want to use the forfiles command, like this:
So in full:
This is without attributes however. I guess one could combine for and forfiles to get attributes and seconds...
Code: Select all
forfiles /p "$(FullPath)" /m "$(Name)" /c "cmd /c echo @fdate @ftime @fsize @path"
Code: Select all
setlocal ENABLEDELAYEDEXPANSION&(if "!SA!"=="" set SA="%TEMP%\sa%RANDOM%")&forfiles /p "$(FullPath)." /m "$(Name)" /c "cmd /c echo @fdate @ftime[TAB]@fsize[TAB]@path"| findstr /r /v /c:"^$$" >>!SA!&clip <!SA!
Last edited by mdruiter on 16 Aug 2022, 13:23, edited 1 time in total.
Re: File list export from Find Files & Directories
Sorry... but after reading all the comments, I admit I am getting lost. I have tried what you are posting but it is not working, so I am sure I am not understanding it well.
Could you please summarize the list of steps required to export the whole list of results to an external file or the clipboard, including file size and date?
Thank you in advance!
Could you please summarize the list of steps required to export the whole list of results to an external file or the clipboard, including file size and date?
Thank you in advance!
Re: File list export from Find Files & Directories
Sure, that is actually a great idea as it's not trivial...
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):
- 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
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!
Re: File list export from Find Files & Directories
Thank you IMHO the most convienient and powerful workaround for the missing feature.
FYI, related posts with different solutions are:
FYI, related posts with different solutions are:
Using Salamander since v 1.52
File list export from Find Files Directories
Hello there,
I use keyboard shortcut for copying file-path all the time. But this feature does not work in Find-files window CtrlF. I have to go to file Spacebar and then I can copy what I need to. It would be great to be able to do it right from the search dialog.
Thank you.
I use keyboard shortcut for copying file-path all the time. But this feature does not work in Find-files window CtrlF. I have to go to file Spacebar and then I can copy what I need to. It would be great to be able to do it right from the search dialog.
Thank you.
Re: File list export from Find Files & Directories
Hi skidus,
you should have created a new thread, rather than hijacking this one ...
This thread is about Salamander's lack of an option to export a list of found files, and offers various solutions.
Back to your matter. What exactly does not work where exactly?
For me, the usual shortcuts to copy various parts of the file in focus to the clipboard work ok, and also, the entries are there in the Edit menu, as always. This may not work, if you are in a custom find dialog of a plugin file system (e.g. the registry).
you should have created a new thread, rather than hijacking this one ...
This thread is about Salamander's lack of an option to export a list of found files, and offers various solutions.
Back to your matter. What exactly does not work where exactly?
For me, the usual shortcuts to copy various parts of the file in focus to the clipboard work ok, and also, the entries are there in the Edit menu, as always. This may not work, if you are in a custom find dialog of a plugin file system (e.g. the registry).
Re: File list export from Find Files & Directories
For this and other small operations I starter use XYplorer:
- export founded items (as CSV, clipboard)
Screen:
https://imgur.com/a/9JBVVBS
- export founded items (as CSV, clipboard)
Screen:
https://imgur.com/a/9JBVVBS