DSPRelated.com
Forums

SIZE OF THE FILE - COMMAND FOUND

Started by satish kumar December 29, 2005
Hi all,

Thanks for your responses. Actually, none of what you said worked for me unfortunately. Sorry.

I found this command fitsinfo in the manual. This is actually used to get information about a FITS (Flexible Image Transport System) file. However, if someone is interested only in the size of a file, this seems to be doing the job.

In my case, I had a data file. I just did the following:

load datafile
infor = fitsinfo( 'datafile' )
filesize = infor.FileSize

filesize will give you the size of the file in bytes. This is what I wanted.

Anyways, thanks everyone again. Regards,
Satish Chimakurthi


Hi Satish

actually by using dos commands in matlab u can get size of a file...

for example
----------------
%only for one file
D = dir('C:\MATLAB6p5p1\work\example.mat');
sizeoffile=D.bytes

---------------
%or u can get all mat files size's in a directory
D = dir('C:\MATLAB6p5p1\work\*.mat');
sizeoffile=D.bytes >From: satish kumar <worldofsatish@worl...>
>To: matlab@matl...
>Subject: [matlab] SIZE OF THE FILE - COMMAND FOUND
>Date: Thu, 29 Dec 2005 06:21:16 -0800 (PST)
>
>Hi all,
>
> Thanks for your responses. Actually, none of what you said worked for me
>unfortunately. Sorry.
>
> I found this command fitsinfo in the manual. This is actually used to
>get information about a FITS (Flexible Image Transport System) file.
>However, if someone is interested only in the size of a file, this seems to
>be doing the job.
>
> In my case, I had a data file. I just did the following:
>
> load datafile
> infor = fitsinfo( 'datafile' )
> filesize = infor.FileSize
>
> filesize will give you the size of the file in bytes. This is what I
>wanted.
>
> Anyways, thanks everyone again. > Regards,
>Satish Chimakurthi