Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cffile acting weird

Status
Not open for further replies.

MarcDePoe

Programmer
Dec 19, 2000
101
US
this one is baffling me ...

I'm using cffile twice in a loop.

<cffile action=&quot;WRITE&quot; file=&quot;c:\data\#counter#.txt&quot; output=&quot;#t_1#&quot; addnewline=&quot;No&quot;>
<cffile action=&quot;WRITE&quot; file=&quot;c:\data\#counter#.txt&quot; output=&quot;#t_2#&quot; addnewline=&quot;No&quot;>

The first file is 18k, the second, 1k.
The loop loops about 2000 times.

To round off, I need about 40 megs free.
When the template is done processing, I'm left with a folder holding 34.8 megs of the files I just put there, and nothing else.

Here's what I don't understand...

The drive this folder is on is now approx 180 megs shy of what it was before, not 34.8. The more files written, the more mysterious missing disk space. At first I thought it might have something to do with the pagefile or something, but it doesn't. As soon as I delete the files (supposedly 34.8 megs), the hard drive magically has 180 more megs free NOT 34.8!

If it matters, NT 4.0/FAT 32

can anyone explain this madness?

-Marc

 
We need to see the exact code here. Paste it in here and Ill take a look.

Just the loop tag and EVERYthing within that loop tag. You can just email it to me if you like.

nic@strantheman.com
 
Right on! Good to see that your code isnt the issue, thats so crazy that it was so unrelated! Ive never done that many CFFILE commands in one process. Ive built a few publishing tools, but the most modules i might publish in one batch is 50, although those are more like 10k HTML files.

I was wondering why you would exclude your parameter prep. from the loop, but that makes sense now. However, is it very difficult to add say, another file to this process?

Im glad I could atleast bounce ideas back at you.

-----from MarcDePoe
About 20 minutes ago I figured out what the problem was!
the drive (partition) was FAT. I ran it on NTFS and there were no problems.
I think the FAT system sticks in a sick amount of cushion per file (640k ? I'm
not quite sure)
But the code I tested on both was simply a loop with one cffile
(writing out 1000 1k files) in it.


Again, thanks for your help,
-Marc
 
Strantheman,

Thats the way fat allocates its cluster sizes, 64k sectors. Therfor if you have a file that is 65K you will use 128K of disk space. Verses NTFS , 4k, the same senario you would use only 68K.
 
Jeff1

Thanks.. man so many things I would never have considered, like why anyone would use NT instead of Linux for CF. heh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top