フィルターのクリア

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

4 ビュー (過去 30 日間)
zhang bo
zhang bo 2024 年 6 月 7 日
移動済み: Image Analyst 2024 年 6 月 9 日
How do I copy a file to a clipboard using MATLAB, just like using the shortcut Ctrl+C in a Windows system. Thanks!

採用された回答

zhang bo
zhang bo 2024 年 6 月 9 日
移動済み: Image Analyst 2024 年 6 月 9 日
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);"

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by