Repository navigation
Replacement for SendTo menu (when native one misbehave, with missing items, as in Nilesoft Shell 1.9.18 in my case) #844
Replies: 2 comments
|
Previous version SendSelectionTo Version 1 : |
|
SendSelectionTo Version 2 : as attachment in first post Code cleaning and optimizing, improving file/folder copy security, some new features and related options (that can be customized or disabled) The options that can be changed by the user at the beginning of the 'menu' declaration : |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This code, in the attachment, can be copied in the shell.nss file of Nilesoft Shell to create a replacement for the native Explorer SendTo menu.
It also removes the native SendTo menu.
The file can probably also be saved in the import folder, and then imported in shell.nss via an import : 'imports/SendSelectionTo_v2.nss' (after removing the.txt extension of the attachment)
The length of this code is not small: about 2000 lines. However I did not notice a slow-down in context menu showing.
In my case the native SendTo menu exhibited a random behavior with some, or most, of SendTo items not appearing.
Credit to [RubicBG] I think for initial idea and code.
#364 (comment)
Limitations : many
*I did not create some special items : 'Compressed (zipped) folder', 'Documents (create copy)', 'Mail recipient' that can be found in the previous link.
*I did not implement sending to a shortcut whose target is a folder (for copying selection to this folder) : too heavy or dangerous, however I implemented sending to any drive root (except the system drive), with some security and limitation (especially no folder overwrite/merge).
*As I have made it, it is limited to read 60 .lnk files in the user.sendto folder.
Holding the Shift key, when sending to a shortcut, allows to send a multiple selection as multiple parameters to a single instance of a program (not all programs will support opening multiple files/folders in one command line) :
myprog.exe "selected_file_folder_1" "selected_file_folder_2" "selected_file_folder_2"
Side comments :
I have tested my code, mostly the Send (Copy) To drive root, which is the most difficult and dangerous.
I regret that menu items can not be created in a loop, with arrays, to avoid code repetition, like :
myarray=['a', 'b', 'c']
for(i=0, i<len(myarray)) {
item(title='item_' + myarray[i])
}
If someone wants to correct or improve this code it is free to reuse.
SendSelectionTo Version 2 :
SendSelectionTo_v2.nss.txt
All reactions