finding path and timestamp of file used
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (1)
Adam
le 12 Déc 2014
myFile = java.io.File( filename );
myFile.lastModified
myFile.getCanonicalPath
5 commentaires
Neesha
le 12 Déc 2014
Adam
le 12 Déc 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
le 12 Déc 2014
Neesha
le 12 Déc 2014
Adam
le 12 Déc 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.
Catégories
En savoir plus sur Dates and Time dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!