Forum Discussion

Manfred_F's avatar
Manfred_F
Regular Contributor
8 years ago

check free disk space on log drive

how can I do this by script?

I tried the online help, but searching for "Log Location" gives me many dozens of hits..

4 Replies

    • Manfred_F's avatar
      Manfred_F
      Regular Contributor

      hi and thanks,

      I knew this one. But - where canI get the log Folder Name via script?

      • ghuff2's avatar
        ghuff2
        Contributor

        I think the Log file is always saved to the Log folder in the Project folder. Maybe someone can correct me, but I don't think there is any way to change that. So you can use Project.Path to get the project folder, which will give you the drive which log files are stored on. Then use the statement baxatob provided to get the Free Space for that drive. Something like this in python:

         

        aqFileSystem.GetDriveInfo(Project.Path.split('\\')[0]).FreeSpace

         

         

        Edit: tristaanogre's solution is much better.