Add directory path to fopen
20 views (last 30 days)
Show older comments
Graur Alin
on 7 Jul 2015
Commented: Azzi Abdelmalek
on 7 Jul 2015
I have this code:
name = strrep(name,' ','_');
date = strrep(date,' ','_');
FileName=[name '_' date '.txt'];
file=fopen(FileName,'wt');
it creates a text file with the name and date I get from some edittext box in GUI in the current folder.
Can I add a directory path to that so it creates the text file in another folder like: ../DB/filename.txt ?
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Standard File Formats in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!