How to copy files in cmd or powershell like in file explorer

傲天 吴 20 Reputation points
2023-05-06T09:43:03.1833333+00:00

What I want is not to read the entire contents of the file, but to copy the file just like pressing Ctrl+C in file explorer. After copying the file, I will press Ctrl+V to paste it into the chat software dialog box. 

I want to achieve it through PowerShell or cmd, and it would be even better if it can be implemented in Python.

If anyone knows the answer to this question, please let me know. Thank you very much.

Windows for business Windows Server User experience PowerShell
Windows for business Windows Client for IT Pros User experience Other
0 comments No comments
{count} votes

Accepted answer
  1. Rich Matheisen 47,901 Reputation points
    2023-05-06T14:37:27.0633333+00:00

    Use the PowerShell Copy-Item cmdlet (minus the GUI part).


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.