Jump to content

How to differentiate a folder and a file?


mik
 Share

Recommended Posts

In windows explorer, many files and folders may be under the same folder, and with controllistview method, we can get many things of these files and folders. But How to differentiate a file and a folder? Does autoit provide some methods?

thank you!

Link to comment
Share on other sites

@all

Using this :

$objFSO = ObjCreate("Scripting.FileSystemObject")
$objFolder = $objFSO.GetFolder("C:\Windows\System32")

Consolewrite ( "Type " & $objFolder.Type & @CRLF )

If it returns a Type it is a Folder otherwise it is a File.

regards

ptrex

Link to comment
Share on other sites

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...