We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi all,
I want to create a file on a USB pendrive (FAT16 or FAT32 file system).
My FAT code is ok with Linux (I can open the file), but it doesn't work with Windows XP. It says it cannot find the file.
In the directory entry structure I have set the short name field (the name is "FILE"), the last write time and date, the first cluster (LO and HI), the file size and the file attribute (0x20).
What does Windows also need in order to see correctly the file?
Please help!
How does this relate to Keil products?
http://www.keil.com/forum/
I encountered this problem while I was programming a keil board in order to create a file on a usb pendrive.
Anyway, no more off-topic than this:
http://www.keil.com/forum/docs/thread5004.asp
I have found the error...
Windows accepts only uppercases and spaces...
Then, there must have been something wrong with your original question. It specifically mentioned the file name "FILE" - which is only uppercase.
"Windows accepts only uppercases and spaces..."
There must be more to it than that - Windows allows and maintains lowercase in filenames...
Do you mean it's uppercase only in the short name?
Does the short name really allow spaces?!
Yes, the shortname field (there are other fields for longnames which can contain everything) should contain only uppercases and spaces. So, since the shortname field is 11 bytes long, the correct name for the file is "FILE" + 7 spaces.
Back in the days of MS-DOS v3.31, I'm sure we used to play tricks with a disk editor where we'd put ANSI escape sequences into filenames - so that your screen would go exciting colours whenever that entry appeared in a directoy listing...
And you could make files unusable by putting a space in the name (short names were the only names back then)...
Them were the days...
3.31? A latecomer to DOS :)