How to make an app - Andromo App Maker


No announcement yet.

Determining the Amount of Free Space on a Drive

  • Filter
  • Time
  • Show
Clear All
new posts

  • Determining the Amount of Free Space on a Drive

    AutoPlay Media Studio 5.0 Knowledge Base

    Determining the Amount of Free Space on a Drive

    Document ID: IR10072
    The information in this article applies to:
    • AutoPlay Media Studio 5.0 Professional Edition


    This article describes how to determine if the user has a sufficient amount of free space on their system.


    When installing software to a user's system, it is useful to ensure that the user's system has enough free space on their hard drive to accommodate the software.

    To accomplish this in AutoPlay Media Studio 5.0, insert the following code into any event in your application:

    --space required, in megabytes

    space_required = 253

    --get free space on the user's system (c:\ drive)

    space_available = Drive.GetFreeSpace("C:");

    --compare free space available to free space required

    if space_required > space_available then

    Dialog.Message("","You are "..(space_required - space_available).." MB short");


    Dialog.Message("","You have "..(space_available - space_required).." MB more than you need");

    Please note that the variable space_required must be set by you. 253 is an arbitrary number.


    For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:

    • Program Reference | Actions | Drive | Drive.GetFreeSpace

    KEYWORDS: AutoPlay Media Studio 5.0, Drive, Free Space, Required

    Last reviewed: October 3, 2003
    Copyright 2003 Indigo Rose Corporation. All rights reserved.