How to use robocopy in matlab ?
6 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I have 2 path strings in matlab:
source="C:\2018\c\EM"
destination="U:\Probe\EM"
and i want to use them as arguments for robocopy
when i write system('robocopy source destination') it doesen't work like I want.
robocopy doesn't read the content of source and destination.
Can you help me with this function. Thank you
0 件のコメント
回答 (2 件)
Steven Lord
2019 年 2 月 21 日
Build the command from the text data then pass the constructed command into system.
source="C:\2018\c\EM"
destination="U:\Probe\EM"
command = "robocopy " + source + " " + destination
system(command)
You may need to add single quotes around the source and destination locations if they contain spaces. Add those quotes inside the strings "robocopy " and " ".
houssem gara
2019 年 2 月 22 日
2 件のコメント
Steven Lord
2019 年 2 月 22 日
I've never used robocopy so I'm not sure how (or if) you can get it to work recursively. You're probably going to need to read through its help / documentation, ask the author, or post on a forum for that software.
参考
カテゴリ
Help Center および File Exchange で Filename Construction についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!