Azzera filtri
Azzera filtri

How do I copy a file to a clipboard using MATLAB?

4 visualizzazioni (ultimi 30 giorni)
How do I copy a file to a clipboard using MATLAB, just like using the shortcut Ctrl+C in a Windows system. Thanks!

Risposta accettata

zhang bo
zhang bo il 9 Giu 2024
Spostato: Image Analyst il 9 Giu 2024
Thanks!
It seems that clipboard.m function cannot copy files to the clipboard!
I solved this problem with the following Windows command:
set file=E:\MATLAB\demo.txt
powershell -sta "$sc=New-Object System.Collections.Specialized.StringCollection;$sc.Add('%file%');Add-Type -Assembly 'System.Windows.Forms';[System.Windows.Forms.Clipboard]::SetFileDropList($sc);"

Più risposte (0)

Categorie

Scopri di più su Environment and Settings in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by