Re: Availabe diskspace

2016-05-11 Thread JB
Thank you very much.
I looked and missed it.

JB


> On May 11, 2016, at 8:59 AM, Mike Bonner  wrote:
> 
> From the dictionary: Returns the amount of free space on the disk that
> holds the defaultFolder.
> 
> So, set the defaultfolder to the root (or a folder) on the drive where you
> want to get the diskspace.
> 
> On Wed, May 11, 2016 at 9:34 AM, JB  wrote:
> 
>> If you want to ge the available diskspace
>> you can use the following function.
>> 
>> on mouseUp
>>   answer info "Show diskspace" with "GB" or "MB" or "KB"
>>   put it into theUnits
>>   get humanReadableDiskSpace (theUnits)
>>   ask info "Availabe diskspace" with it
>> end mouseUp
>> 
>> function humanReadableDiskSpace theUnits
>>   beep
>>   set the caseSensitive to false
>>   switch char 1 of theUnits
>>  case "k"
>> return the diskSpace div 1024 & " kb"
>> break
>>  case "m"
>> return the diskSpace div (1024^2) & " mb"
>> break
>>  case "g"
>> return the diskSpace div (1024^3) & " gb"
>> break
>>  default
>> return the diskSpace
>> break
>>   end switch
>> end humanReadableDiskSpace theUnits
>> 
>> 
>> What is the proper way to get the diskspace
>> from a external drive?
>> 
>> JB
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Availabe diskspace

2016-05-11 Thread Mike Bonner
>From the dictionary: Returns the amount of free space on the disk that
holds the defaultFolder.

So, set the defaultfolder to the root (or a folder) on the drive where you
want to get the diskspace.

On Wed, May 11, 2016 at 9:34 AM, JB  wrote:

> If you want to ge the available diskspace
> you can use the following function.
>
> on mouseUp
>answer info "Show diskspace" with "GB" or "MB" or "KB"
>put it into theUnits
>    get humanReadableDiskSpace (theUnits)
>ask info "Availabe diskspace" with it
> end mouseUp
>
> function humanReadableDiskSpace theUnits
>beep
>set the caseSensitive to false
>switch char 1 of theUnits
>   case "k"
>  return the diskSpace div 1024 & " kb"
>  break
>   case "m"
>  return the diskSpace div (1024^2) & " mb"
>  break
>   case "g"
>  return the diskSpace div (1024^3) & " gb"
>  break
>   default
>  return the diskSpace
>  break
>end switch
> end humanReadableDiskSpace theUnits
>
>
> What is the proper way to get the diskspace
> from a external drive?
>
> JB
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Availabe diskspace

2016-05-11 Thread JB
If you want to ge the available diskspace
you can use the following function.

on mouseUp
   answer info "Show diskspace" with "GB" or "MB" or "KB"
   put it into theUnits
   get humanReadableDiskSpace (theUnits)
   ask info "Availabe diskspace" with it
end mouseUp

function humanReadableDiskSpace theUnits
   beep
   set the caseSensitive to false
   switch char 1 of theUnits
  case "k"
 return the diskSpace div 1024 & " kb"
 break
  case "m"
 return the diskSpace div (1024^2) & " mb"
 break
  case "g"
 return the diskSpace div (1024^3) & " gb"
 break
  default
 return the diskSpace
 break
   end switch
end humanReadableDiskSpace theUnits


What is the proper way to get the diskspace
from a external drive?

JB

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode