File Size, Volume Size 
Author Message
 File Size, Volume Size

Hallo

Is there any free function to get the file size of a file
and the free size of a volume ??

Thanks
Adriano



Fri, 01 Apr 2005 20:58:24 GMT  
 File Size, Volume Size
You can get the free space as follows

  Module('kernel32')
    GetDiskFreeSpace(string lpRootPathName,*Long lpSectorsPerCluster,*Long
lpBytesPerSector,*Long          lpNumberOfFreeClusters,*Long
lpTtoalNumberOfClusters),Long,Pascal,raw,name('GetDiskFreeSpaceA')
End

Drivepath        cstring(255)
sectors            long
bytesper          long
Freec              long
totclusters        long
space              long
  code
  Drivepath='C:\'
  space=getdiskfreespace(Drivepath, Sectors, Bytesper, Freec, totclusters)
  message('free space = '&space)

I think that should work

Cheers
--
Ian Holdsworth
Senior Programmer / Assistant IT Manager
Response Analysis & Mailing Ltd

---------------------------------------------------

Direct Line:      +44 (0) 20 8880 8866
Switch Board:  +44 (0) 20 8880 8140
Fax:                 +44 (0) 0870 134 0987


Web Site:         www.ram-ltd.co.uk



Quote:
> Hallo

> Is there any free function to get the file size of a file
> and the free size of a volume ??

> Thanks
> Adriano



Fri, 01 Apr 2005 22:30:35 GMT  
 File Size, Volume Size
Articles on CMag by Larry Sand on loading a DLL include a demo program to
get the info you want

--

---------------------------------------------------
Carl Barnes  [Team SoftVelocity]

Maker of CW Assistant and Clarion Source Search Utilities



Fri, 01 Apr 2005 23:04:06 GMT  
 File Size, Volume Size
See Clarionfoundry under API/WINAPI and the entries for GetFileSize and
GetDiskFreeSpaceEx

--
--
Kind regards,
James Cooke
http://www.clarionfoundry.com - a concise technical reference for Clarion
Programmers
http://63.99.156.24/
=========================================



Quote:
> Hallo

> Is there any free function to get the file size of a file
> and the free size of a volume ??

> Thanks
> Adriano



Sat, 02 Apr 2005 00:36:46 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Getting Volume Size/Free Space VIA appleevent

2. Drive Size and or Volume Label

3. How can I know the .EXE file name, file date, file size

4. ADIR() Size vs Calculated Size

5. ANS Forth: Cell Size vs. Address Size

6. Maximum size of unnamed pipe size in ruby

7. Video ram size and system ram size

8. Operand-size and Address-size prefix bytes

9. Direct Access Record Size vs. Disk Sector Size

10. Size(ASSUMED Size ARRAY)

11. Constant size exceeds variable size?

12. Scrollbars under windows don't have correct size if created with sizes other than default

 

 
Powered by phpBB® Forum Software