I would like to add a function to the context window (right-click) in Explorer.
I want it to send the list of selected files to print on the default printer.
@echo off dir %1 /-p /o:gn > “%temp%Listing” start /w notepad /p “%temp%Listing” del “%temp%Listing” exit
from this page which works on the entire contents of a folder.
That is not quite what I want - I want only files that have been selected in a folder.
I also see how to use "Copy as path" on a selection, but that would then need me to paste to a text file and print it.
So I am looking for a combination of both of these in a sense, but I only want a list of file names - no paths.
- I select multiple files in a directory
- I right click and choose the function
- List of filenames only are printed.
figured it out. thanks for comments. Send to Menu was an extra step so put it on main context menu. requires this
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\printlist] @="Print List of Files Selected" [HKEY_CLASSES_ROOT\*\shell\printlist\command] @="singleinstance.exe \"%1\" \"C:\\\\Windows\\printlist.bat\" \"$files\" --si-timeout 400"
:: Get the date/time FOR /f %%a in ('WMIC OS GET LocalDateTime ^| find "."') DO Set _DTS=%%a Set _datetime=%_DTS:~0,4%-%_DTS:~4,2%-%_DTS:~6,2%@%_DTS:~8,2%-%_DTS:~10,2%-%_DTS:~12,2% Echo %_datetime% ^%LF% >> "%temp%\Listing.txt" for %%A in (%*) do ( echo %%~nA ^%LF% >> "%temp%\Listing.txt" ) start /w notepad /p "%temp%\Listing.txt" del "%temp%\Listing.txt" exit