Read files from a different directory in standalone applications
Show older comments
Hello,
Please help me with the following:
I create a standalone executable with Application Compiler App (I am using R2017a).
Then I install the application in Program Files.
To run the Application (namely Model_A), I go to the Command Prompt and type:
application\Model_A
Model_A starts to run and read files from the directory that is installed in Program Files.
How can read files from another directory, for example, C:/users/user1/Desktop/Folder1?
should I use a command in command prompt that redirects Model_A from Program files to Folder 1?
Thank you.
Best,
Pavlos
Accepted Answer
More Answers (1)
Birdman
on 19 Oct 2017
0 votes
You can set your directory to a file which contains both Program Files and Folder1.
5 Comments
pavlos
on 21 Oct 2017
Birdman
on 21 Oct 2017
When the modelA starts to run, you also want to run the files from C:/users/user1/Desktop/Folder1. Then, all you have to do is to carry the Folder1 to the folder where the modelA files take place, so that they will be in the same directory. You can not set two directories at the same time.
pavlos
on 21 Oct 2017
Birdman
on 21 Oct 2017
application\Model_A "C:/users/user1/Desktop/Folder1"
When you do this, the spacing between modelA and "C... gives a command that application\Model_A is a function and the next statement will be its input. So it is invalid that you try to write like that. Use
cd
command for changing the directory. Let me know what happens.
pavlos
on 21 Oct 2017
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!