Open raziel6868 opened 1 year ago
@minlmao thank you for your recommendation! That's right, the script stores folder paths into registry, however not every subfolder and file is stored into the registry, and the list gets cleaned after robocopy finishes - so the registry doesn't get bloated.
However, the idea is great. I've given it some thought and I think I could implement it together with the existing system. Right now, I'm not sure if I can save the folder names to clipboard if the user is copying multiple folders through the right click menu. If there's an option to append folders to the clipboard, then it might be possible, because the script currently opens a new process for every folder selected. All of this would be solved if I had a proper context menu handler written in c++, for example.
For copying single folders, and for using ctrl+C, there should be no major problems.
Is your feature request related to a problem? Please describe. After reviewing the source code of rcp.ps1, I suppose the script stores a list of folders in the registry key HKCU:\RCWM and then for each folder, the script uses robocopy to copy or move it to the specified destination. However, with thousands of folders and large files to copy, the amount of registry value generated in HKCU:\RCWM will be enormous, negatively impacting read/write speed of Windows Registry.
Describe the solution you'd like I'm thinking of using
System.Windows.Forms.Clipboard
to get list of folders and files from users pressing Ctrl+C or click Copy on right click menu, after that you can use Robocopy loop to go through the list. What do you think ?Additional context