Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Trouble Compiling Code Dependent on Folder Locations
1 回表示 (過去 30 日間)
古いコメントを表示
My script requires the user to place input text files in a specific directory. This directory is pre-made, and is referenced by name and location relative to the script's location. This specific directory is not maintained during compilation. How can I get around this?
0 件のコメント
回答 (1 件)
Image Analyst
2014 年 7 月 22 日
Don't make it relative to the compiled executable's folder. Just hard code the exact folder location (the "pre-made directory") into your code. I mean, you know exactly what it is, so why not?
2 件のコメント
Joseph Cheng
2014 年 7 月 22 日
編集済み: Joseph Cheng
2014 年 7 月 22 日
Why not change the script to ask where these files are located? a simple uigetfile/uigetfolder implementation should negate any need for files to be in a specific location.
Secondly if you insist that it "*must* " be this way, you can use perform some necessary checks and use mkdir() to create the folder in an installation script file.
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!