Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 5th, 2005, 8:05 AM   #1
BungalowBill
Programmer
 
Join Date: Dec 2005
Posts: 40
Rep Power: 0 BungalowBill is on a distinguished road
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.
BungalowBill is offline   Reply With Quote
Old Dec 5th, 2005, 9:54 AM   #2
Prm753
Professional Programmer
 
Prm753's Avatar
 
Join Date: Oct 2005
Location: United States
Posts: 447
Rep Power: 4 Prm753 is on a distinguished road
Send a message via AIM to Prm753 Send a message via MSN to Prm753
msdn.com is nice for code tips and snippets of code, but I don't think people will want to code this for you.
__________________
The world's first athletic computer geek!
The home of PrProgramsStudios
How not to post a question: <-- Please don't reply
Prm753 is offline   Reply With Quote
Old Dec 5th, 2005, 10:26 AM   #3
Navid
Hobbyist Programmer
 
Navid's Avatar
 
Join Date: Feb 2005
Location: Canada
Posts: 187
Rep Power: 4 Navid is on a distinguished road
Send a message via MSN to 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?
Navid is offline   Reply With Quote
Old Dec 5th, 2005, 1:04 PM   #4
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
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.
Polyphemus_ is offline   Reply With Quote
Old Dec 5th, 2005, 10:56 AM   #5
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
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.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Dec 5th, 2005, 2:08 PM   #6
Navid
Hobbyist Programmer
 
Navid's Avatar
 
Join Date: Feb 2005
Location: Canada
Posts: 187
Rep Power: 4 Navid is on a distinguished road
Send a message via MSN to Navid
So, I should covert to NTFS and then simply covert back to FAT32? Will I lose anything during the process?
Navid is offline   Reply With Quote
Old Dec 5th, 2005, 2:12 PM   #7
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
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.
Polyphemus_ is offline   Reply With Quote
Old Dec 5th, 2005, 2:21 PM   #8
Navid
Hobbyist Programmer
 
Navid's Avatar
 
Join Date: Feb 2005
Location: Canada
Posts: 187
Rep Power: 4 Navid is on a distinguished road
Send a message via MSN to Navid
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.
Navid is offline   Reply With Quote
Old Dec 5th, 2005, 3:24 PM   #9
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
You can't convert back like that, but yes, that'll work.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Dec 5th, 2005, 9:09 PM   #10
Navid
Hobbyist Programmer
 
Navid's Avatar
 
Join Date: Feb 2005
Location: Canada
Posts: 187
Rep Power: 4 Navid is on a distinguished road
Send a message via MSN to Navid
Alright thanks guys. And sorry BungalowBill, I didn't mean to hi-jack your thread.
Navid is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:29 AM.

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