Open Directory and Read First Entry

\i S F string::dirname

Parameter Type Range Description
dirname file DOS filename (8.3 format) name of the directory to open

Opens the directory depicted by dirname and read the file status of the first entry.

Note

Response: [ACK] status [ACK]

Bytes Description
0 ... 3 file size in bytes
4 file attributes (refer to table below)
5 ... 7 modification date (see Get Date, no weekday)
8 ... 10 modification time (see Get Time)
11 ... 22 DOS filename (8.3 format) filled up with 0

Bit Description
0 write protected
1 hidden
2 system file
4 directory
5 archive

Example

\iSF/DIR1/DIR2\0

This will open the directory "DIR2" which is located in "DIR1" which in turn is located in the root of the SD-Card and read the status of the first entry.

Response Example

[ACK][00][00][96][CC][20][0C][07][0C][0C][24][0E]IMG00000.RII[ACK]

The requested file has a size of 38.604 bytes, has the archive attribute set, the modification date is July 12th, 2012 at 12:36:14 and the filename is IMG00000.RII.

Not supported by: DPC3050, DPC3020, DPC2060, DPC10xx

See also:

MicroSD Card Related Commands
Get File Status
Read Next Entry
Open File