Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6020527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:34:55+00:00 2026-05-23T03:34:55+00:00

Am looking for some (efficient) code to determine the size of a directory /

  • 0

Am looking for some (efficient) code to determine the size of a directory / folder in Windows XP using SAS 9.1.3.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:34:56+00:00Added an answer on May 23, 2026 at 3:34 am

    If you are not constrained by the SAS NOXCMD option (such as SAS Enterprise Guide hitting a SASApp – Workspace Server in its default configuration where the administrator has not opened it up) then I would suggest downloading and using the Microsoft Sysinternals Disk Usage (DU) tool via a SAS data null step using a pipe filename. Here is some sample SAS code:

    filename du pipe "du -q c:\SAS\EBIEDIEG\Lev1\SASApp";
    data work.diskusage;
    infile du;
    input @;
    put _infile_;
    if ( _infile_ =: 'Size:' ) then do;
        sizeInBytes = input(scan(_infile_,2,' '), comma32.);
        output;
    end;
    input;
    run;
    

    Microsoft Sysinternals Disk Usage (DU) is similar to the familiar UNIX du command. You can download Sysinternals DU and review the documentation at http://technet.microsoft.com/en-au/sysinternals/bb896651 It has a -l parameter so you can specify how deep it should go.

    If you are constrained by the NOXCMD option then you could use a series of loops using the SAS DOPEN/DREAD/FILENAME/FOPEN/FINFO/FCLOSE/DCLOSE functions to manually walk the directory tree and add up the file sizes. It will involve much more code but should run in a NOXCMD environment. If you want to use this method then a good starting point will be the SAS documentation for DOPEN at http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000209538.htm where you will also be able to find the documentation and examples for the other functions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking through some code I came across the following code trTuDocPackTypdBd.update(TrTuDocPackTypeDto.class.cast(packDto)); and I'd like
Looking for some sample code (C#) for a simple thread pool implementation. I found
Looking at some code I'm maintaining in System Verilog I see some signals that
I am trying to performance test some code. I am using a stopwatch. When
I am trying to get some percentage data from a stored procedure using code
I'm looking for some ideas on how to do this in the most efficient
I'm looking for the most efficient way to bulk-insert some millions of tuples into
I'm looking for the most efficient way to be able to set some basic
I am looking for efficient and easy to implement code which work for media
Looking for some direction here as I'm running into some migration problems. We have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.