中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-10 10:24
47,811 topics / 349,897 posts / today 0 new / 48,255 members
DOS批处理 & 脚本技术(批处理室) » [Original] SendTo+ Batch Processing Practical Small Tool -- Enhanced Send To
Printable Version  77,979 / 75
Floor1 无奈何 Posted 2006-10-02 03:26
荣誉版主 Posts 356 Credits 1,338
-------------------------
A small correction, thanks to fastslz for discovering the problem and 3742668 for proposing a solution.
For the convenience of updating and modifying files in a timely manner, the download is provided in the form of a link.
The following link will be the latest file for all future versions.
Download: www.songjun.org/SendTo+.zip
-------------------------
Because of personal reasons, I haven't been able to come to the forum for some time. It's hard work for brother 3742668 to manage the board; I also saw the news that brother willsort has temporarily withdrawn, and I miss the days of discussing together; at the same time, I congratulate namejm on joining the moderator team. As a moderator, I feel that I am not doing my duty. I have sorted out and refined the small things I originally made and give them to everyone as a small gift for National Day. For specific introductions, you can see the following help file.
This is a small software made with batch processing. The knowledge points involved include querying and adding the registry, adding environment variables, dynamically displaying selection prompts, and how to use configuration files in batch processing, etc. Due to the relatively many functions, although I have done a lot of testing, I still can't guarantee that there will be no problems. For problems, suggestions, and discussions on the code, you are welcome to post replies. Because the functions of batch processing are limited, the software comes with two command-line small tools. It is impossible to implement it purely with batch processing. I hope that friends who are capable and interested can make a VBS script version. I wish everyone a happy holiday.
An attached picture
Help:
This software is a practical tool made with batch processing. After installation, it will add some practical features to "Send To", such as copying file path names, batch renaming, quickly opening directories, saving clipboard text to a file, etc. The realization of the function is completed by more than 20 batch processing scripts. Batch processing has strong customizability. You can even add batch processing scripts by yourself.
●Installation instructions
The initial version only needs to copy the folder to the current user's SendTo directory to use all functions. In the current version, I made an installation batch processing. Just extract the file to any directory and execute Install.cmd to follow the prompts to complete the installation. A large number of CMD command-line features are used in the batch processing script, so it is not compatible with 9X series systems. 2000 should be usable but I haven't tested it. The software installation process will register a user variable, located under HKEY_CURRENT_USER\Environment, the SendTo+ key. The user variable will only take effect after logging off or restarting. After the installation is complete, it will prompt to log off the system.
●Function description
After the default normal installation, a SendTo+ folder will be generated in the current user's SendTo directory. The usage method is to select a file or folder in any directory, point to Send To, and SendTo+ to see the function options. Note that the functions called after selecting a file and a folder are different. Multiple selections are supported, and multiple files or folders are supported as long as the operation is reasonable. The directory list and personal recommendation degree are as follows:
○Command Prompt ★★★
○Open Directory ★★★
 ◇Add this folder
 ◇Remove this folder
○Shortcut
 ◇Add to "Start Menu"
 ◇Add to "Quick Launch" ★★
 ◇Add to "Other Folders" ★★★
 ◇Add to "Favorites"
○Text operation
 ◇Copy text to clipboard
 ◇Clipboard text to same-named text ★★★
 ◇Clipboard text to new text ★★★★
 ◇Clipboard text replace to text
 ◇Clipboard text append to text
 ◇Clear text file
○File operation
 ◇Copy file path to clipboard
 ◇Copy file name to clipboard ★★★
 ◇Copy file full path to clipboard ★★★★
 ◇Random number batch rename ★★★
 ◇Text title batch rename ★★★
 ◇Serial number batch rename
 ◇Create a new folder with the current date
 ◇Create a new folder with the same name or clipboard ★★★
 ◇Undo last batch rename
 ◇Encrypt batch processing file

●Advanced instructions
Since the use of the software is very simple, no excessive description is made. Let's talk about the operation method. Some operations are distinguished between whether the current selection is a file or a folder. For example, when the "Command Prompt" item selects a file, the path of the opened command window is the path where the file is located, and when a folder is selected, it is the path of the selected folder. The same applies to items like "Clipboard text to new text", and it will be renamed with the first line of the text. The most special one is "Create a new folder with the same name or clipboard". Selecting a file will create a folder with the same name. Selecting a folder will create a folder under it with the clipboard content as the name. You can try selecting multiple files and folders to see the effect. There are also some operations that are meaningless. For example, calling "Create a new folder with the current date" for multiple selected files will only generate one folder, but it will be very different for multiple selected folders. There are also some operations that do not distinguish between files, folders, and directories. For example, "Undo last batch rename" has the same result no matter where the operation is performed.
Regarding the name of the folder generated in "Send To", you can modify the content after the = sign in SendTo+.ini to make it more in line with your own usage habits. The names of the operation items under the folder can be modified in Install.cmd, the name of *.lnk following "/f:", and you can add serial numbers to arrange them in the order of habits. ShortcutToFolder.ini in the CMD folder under SendTo+ is the file record added to "Other Folders". The lines starting with "*" will be topped for selection. When the operation is executed, if the required target folder is not here, it will prompt to enter the target location and record it in this file. In subsequent versions, the function of adjusting the order according to the frequency of use will be added. The Desktop.ini with the hidden attribute is the definition file for the folder display icon, please do not delete it.
Known issues: When the file name contains special characters such as & |, the operation may fail. The reason is that the parameters passed to the script by Send To are not in quotes by default, which will cause parsing parameter errors. The way to deal with it is to change the file name to remove special characters or add spaces in the file name. There is no complete solution for this. When multiple files are operated, the error prompt "Windows cannot access the specified device, path, or file. You may not have appropriate permissions to access this item." occurs. It is because too many files are selected, exceeding the character limit of the command line. The solution is to reduce the selection of files.
Two command-line small tools, winclip.exe and Shortcut.exe, are packaged in the software and can be downloaded here: http://dmst.aueb.gr/dds/sw/outwit/. It is much more powerful than Microsoft's clip.exe and Shortcut.exe. I have simply encrypted the batch processing files. The principle is referred to: http://www.cn-dos.net/forum/viewthread.php?tid=22254. The purpose of encryption is not to prevent people from seeing the source code, but to prevent users from making incorrect modifications when they are not familiar. If you are sure what you are doing, you can modify and expand it by yourself. There are simple comments in the batch processing scripts. Welcome to correct and communicate if you have any problems and suggestions.


BY:无奈何@cn-dos.net
mail:wunaihe@gmail.com
2006.10.1


——————————————分割线———————————————


***********************************
版务日志
***********************************
操 作: 主题加精
执行人: 3742668
原 因: 无论从点击还是回复上来看,此贴
都达到精华的标准,且实用性较强
说 明: 由于目前并没有一个明确的加精依
据,所以如果对此次操作持怀疑态度
的朋友可以跟贴指出,或者于站内
的消息系统留言说明。
***********************************


[ Last edited by 无奈何 on 2006-10-3 at 14:36 ]

Attachments
SendTo+.gif (16.55 KiB)
Floor2 fastslz Posted 2006-10-02 05:05
铂金会员 Posts 2,315 Credits 5,493 From 上海
Great, download, use and learn

Some functions are what I've always wanted. If the SendTo+ menu is not placed in the "Send To" but can be stretched independently, it would be great (similar to the cascading right-click context menu of WinRAR), which is both beautiful and practical. Looking forward to the next version of SendTo+ by the helpless version master to be able to stretch independently.

Finally, thank you for the National Day gift
Floor3 fastslz Posted 2006-10-02 05:33
铂金会员 Posts 2,315 Credits 5,493 From 上海
Helpless Moderator
I found an unstable situation with the "Favorite" addition function. I can't currently send it to the favorites for the following reason:


In addition to HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
There is another one
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
I think the above key value is a bit stubborn, and the one that actually works is the following key value. For example, the code for setting the favorites:


The hex value is also E:\TEMP\Favorites

[ Last edited by fastslz on 2006-10-2 at 05:39 ]
Floor4 无奈何 Posted 2006-10-02 05:40
荣誉版主 Posts 356 Credits 1,338
It is impossible to make an independent collapsible menu; it must be implemented by writing a .dll file, but I don't know Windows programming. The compromise is to copy the most commonly used functions to the SendTo root directory, or modify the installation file Install.cmd. Please note that "Open Directory" may not be flexible enough, and other shortcuts that do not depend on the directory where they are located are all right.
Floor5 electronixtar Posted 2006-10-02 07:43
铂金会员 Posts 2,672 Credits 7,493
Good stuff, got it.

It is suggested to add a simple function of merging files, using copy /b +
Floor6 无奈何 Posted 2006-10-02 08:09
荣誉版主 Posts 356 Credits 1,338
Re fastslz

Thank you for your feedback. I can't reproduce your error. All modifications to User Shell Folders will be reflected in Shell Folders, and Shell Folders stores the actual paths. Also, reg.exe can't query the key value of User Shell Folders because there is a better place to access, which is under Shell Folders. Can you try to modify the code by yourself?

Re electronixtar

I have considered this function. Due to the complex and changeable file names, it is impossible to control the order of merging files. I can only prompt the user to choose. In this case, the convenience is not as good as typing a few times in the command line. What do you think?
Floor7 electronixtar Posted 2006-10-02 09:48
铂金会员 Posts 2,672 Credits 7,493
The merge function is very useful, and it can be easily accomplished using the sort command.

In fact, WinRAR can merge files, heh
Floor8 namejm Posted 2006-10-02 10:25
荣誉版主 Posts 1,737 Credits 5,226 From 成都
There's no way, the moderator's first move is a masterpiece, I'll top it first. Testing in progress...
Floor9 pengfei Posted 2006-10-02 10:33
银牌会员 Posts 485 Credits 1,218 From 湖南.娄底
There's no way, the moderator really has remarkable skills. I'll top it first~~~!
Floor10 3742668 Posted 2006-10-02 11:07
荣誉版主 Posts 718 Credits 2,013
Welcome back, hehe. Regarding the issues with your two tools, it seems one is for creating shortcuts and the other is for operating the clipboard. I think it should be relatively simple to solve with VBS. It is suggested that you post a specific parameter format so that the majority of VBS enthusiasts can also have a try.
Floor11 无奈何 Posted 2006-10-02 11:47
荣誉版主 Posts 356 Credits 1,338
Re 3742668
What I mean is not just replacing these two command-line tools, but completely using VBS to complete all functions and make a pure VBS version. Although I don't understand it, I guess it's all routine operations and won't be too complicated. The VBS version may be more popular than the batch version because the batch can't avoid many drawbacks, such as parameter character limits, special character handling, and the black interface popping up even without interaction. Although I have tried my best to make it not affect the vision, the black shadow will still flash from the taskbar. Launching different versions of the same software allows users to choose according to their needs, which can also be regarded as the development of script technology. I'm very happy if you are interested, and you are the best person I can think of. If the VBS version is done well, the batch version can gradually fade out. It doesn't matter if you don't have time, other friends can also try. Anyone can use SendTo+ all resources. If such a software comes out, I will be very happy as long as it indicates that it is borrowed from our forum.
Re electronixtar
I may want to add this function more than you. sort cannot achieve natural number sorting. GNU sort can achieve it but must specify the character position. It is unlikely to be achieved when the file name is unknown. A feasible way is to predefine some rules and pop up a text editor for users to modify and then merge, but this is too inconvenient, not as handy as a visual software.
Floor12 cxmzlxb Posted 2006-10-02 22:29
新手上路 Posts 13 Credits 17
I want to study by looking at the source code, but unfortunately the owner has encrypted it. Can you give code that renames all files in the folder to 01.*, 02.*, etc., no matter what the original file name is, without changing the extension? Also give one that changes the extension. Need two of them, and need the source code!
Floor13 notiger Posted 2006-10-02 23:17
新手上路 Posts 3 Credits 4
The moderator's move is really generous. Happy National Day!
Floor14 无奈何 Posted 2006-10-03 00:31
荣誉版主 Posts 356 Credits 1,338
Re cxmzlxb
Regarding encryption, it has been explained and is very simple. Just refer to the provided post on the encryption principle, and it's easy to get the source code. After a while, when this version is stable, add a batch renaming function for the interactive interface. Initially, it is intended to be able to name with a specified number of digits and character replacement, etc.

Re all
The repost I saw elsewhere made me laugh and cry. I have already said that encryption is not to prevent seeing the source code.
Can the friends who repost please transfer the entire "Help" section?

[ Last edited by 无奈何 on 2006-10-3 at 05:17 ]
Floor15 vkill Posted 2006-10-03 07:56
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
The moderator has a deep research on the registry, heh heh. I'll take a good look at the dynamic display selection prompt.

[ Last edited by he200377 on 2006-10-3 at 08:07 ]
1 2 3 46  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023