pipe multiple files into a single batch file (using explorer highlight)

后端 未结 5 1488
后悔当初
后悔当初 2021-01-14 19:50

I can already get a batch file to run when a user right clicks on a file type. How can I make it so that only one instance runs per highlighted group and gets all the files

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-14 20:37

    Late to the party but here is my 2 cents. I had the same problem when trying to customise the behaviour of a 'Move to Dropbox Folder...' context menu command. I needed every file selected to be piped to a batch file to handle the processing in one instance.

    After some digging I found Context Menu Launcher.

    Simple enough to use. I popped singleinstance.exe in C:\Windows\system32 and created and ran a .reg file similar to below.

    Windows Registry Editor Version 5.00
    
    ; Documents
    
    [HKEY_CLASSES_ROOT\SystemFileAssociations\document\Shell\Dropbox]
    @="Move to Dropbox Folder"
    "Icon"="%SystemRoot%//system32//imageres.dll,-112"
    "MultiSelectModel"="Player"
    
    [HKEY_CLASSES_ROOT\SystemFileAssociations\document\Shell\Dropbox\command]
    @="singleinstance.exe \"%1\" \"C:\\Move to Dropbox Folder.bat\" $files --si-timeout 400"
    

提交回复
热议问题