Skip to content

Get the list of files and folders that were copied from a .NET Framework #22

@raziel6868

Description

@raziel6868

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 ?

Add-Type -AssemblyName System.Windows.Forms
$selectedItems = [System.Windows.Forms.Clipboard]::GetFileDropList()

foreach ($item in $selectedItems) { something ... }

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions