Jump to content

compress


Recommended Posts

straight from help

DriveGetFileSystem

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

Returns File System Type of a drive.

DriveGetFileSystem ( "path" )

Parameters

path Path of drive to receive information from.

Return Value

Success: Returns the File System Type of the drive as a string; see table below.

Failure: Sets @error to 1.

Return Value Interpretation

1 (numeric) Drive does NOT contain media (CD, Floppy, Zip) or media is unformatted (RAW).

"FAT" Typical file system for drives under ~500 MB such as Floppy, RAM disks, USB "pen" drives, etc.

"FAT32" Typical file system for Windows 9x/Me hard drives.

"NTFS" Typical file system for Windows NT/2000/XP hard drives.

"NWFS" Typical file system for Novell Netware file servers.

"CDFS" Typically indicates a CD (or an ISO image mounted as a virtual CD drive).

"UDF" Typically indicates a DVD.

you have been here long enough to search help

8)

NEWHeader1.png

Link to comment
Share on other sites

straight from help

you have been here long enough to search help

8)

I believe the question is whether the NTFS has compression enabled or not. As far as I know, this is not addressed in the help file. There mgiht be a COM soultion.....

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Until someone find a way to do it with COM or DllCall...

Here is a workaround.

#include <Constants.au3>

$folder = 'C:\Compressed\' ;need to have trailing slash for folder
$compress = False

$foo = Run(@ComSpec & " /c compact /Q " & $folder, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

While 1
    $line = StdoutRead($foo)
    If @error = -1 Then ExitLoop
    ConsoleWrite("STDOUT read:" & $line & @LF)
    If StringInStr($line,"will be compressed.") Then $compress = True
Wend

While 1
    $line = StderrRead($foo)
    If @error = -1 Then ExitLoop
    MsgBox(0, "STDERR read:", $line)
Wend

If $compress Then 
    MsgBox(0, "", $folder & " is compressed")
Else 
    MsgBox(0, "", $folder & " is NOT compressed")
EndIf
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...