Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C (http://www.programmingforums.org/forum60.html)
-   -   FAT creation (http://www.programmingforums.org/showthread.php?t=7402)

BungalowBill Dec 5th, 2005 8:05 AM

FAT creation
 
Does anyone have any tips of creating a FAT. Basically i'm trying to simulate a file system like in a USB stick or something and want to do this right.

The memory will be simulated by an array of 1024 blocks which can be either file data (bytes), directory data, or FAT data connecting the blocks of a file.

However some blocks are special:
Block 0 will be data about the whole file system
Blocks 1 and 2 will be the FAT
Block 3 will be the root directory.

The rest of the blocks will be either data or directory.

Any tips or pieces of code that'll help me out? Cheers.

Prm753 Dec 5th, 2005 9:54 AM

msdn.com is nice for code tips and snippets of code, but I don't think people will want to code this for you.

Navid Dec 5th, 2005 10:26 AM

While we're on the FAT topic,

I have this commpressed file that holds a file that's over 4GB. My computer, being FAT32 can't hold a file that's over 4GB. Is converting to NTFS the only solution in this case? Or is there another way around it?

nnxion Dec 5th, 2005 10:56 AM

Navid, no I think it's the only way..

To OP (BungalowBill): Can you not format the drive to a FAT filesystem? Like in an OS.
The FAT32 filesystem specification can be downloaded. You might find some information here.

Polyphemus_ Dec 5th, 2005 1:04 PM

Quote:

Originally Posted by Navid
While we're on the FAT topic,

I have this commpressed file that holds a file that's over 4GB. My computer, being FAT32 can't hold a file that's over 4GB. Is converting to NTFS the only solution in this case? Or is there another way around it?

You could split the file up into multiple files with winrar or winzip. If you don't want that, converting to NTFS is indeed the only way, but don't worry - it takes not more than 5 minutes.

Navid Dec 5th, 2005 2:08 PM

So, I should covert to NTFS and then simply covert back to FAT32? Will I lose anything during the process?

Polyphemus_ Dec 5th, 2005 2:12 PM

Quote:

Originally Posted by Navid
So, I should covert to NTFS and then simply covert back to FAT32? Will I lose anything during the process?

If you use the right software, nothing will be lost. I prefer Partition Magic for such stuff myself. Make sure your OS supports NTFS, though.

Navid Dec 5th, 2005 2:21 PM

Can't I use DOS though?
I found this command at: http://www.microsoft.com/technet/arc...eploy/fat.mspx

:

CONVERT C: /FS:NTFS

EDIT: My OS is WindowsXP Home, which i think is NT5.

Ooble Dec 5th, 2005 3:24 PM

You can't convert back like that, but yes, that'll work.

Navid Dec 5th, 2005 9:09 PM

Alright thanks guys. And sorry BungalowBill, I didn't mean to hi-jack your thread.


All times are GMT -5. The time now is 4:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC