finding path and timestamp of file used
Show older comments
Hi All,
I am reading data into dataset with rawData = dataset('XLSFile','myData.csv', 'sheet','myData');
I want to collect entire file path with timestamp so that i can later print it as report for all input files like this.
How do i do it?
1 Comment
Neesha
on 12 Dec 2014
Accepted Answer
More Answers (1)
Adam
on 12 Dec 2014
myFile = java.io.File( filename );
myFile.lastModified
myFile.getCanonicalPath
5 Comments
Neesha
on 12 Dec 2014
Adam
on 12 Dec 2014
strange, it works on files I have used it for.
dir( filename )
should give you a structure from which you can get the date also as a string.
Neesha
on 12 Dec 2014
Neesha
on 12 Dec 2014
Adam
on 12 Dec 2014
It doesn't give a struct. Those are actually functions not properties/fields. It confused me at first but
methods( myFile )
shows you the options.
Categories
Find more on File Operations 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!