Jump to content

Easy way to tell file type?


Kidney
 Share

Recommended Posts

 

From Example 3 for FileGetAttrib in the Help File.

; Check if the filepath is a directory/folder. Does not validate if the directory/folder exists.
Func IsDir($sFilePath)
    ;Return StringInStr(FileGetAttrib($sFilePath), "D") > 0
    Return StringInStr(FileGetAttrib($sFilePath), "D") ; removed the '> 0'
EndFunc   ;==>IsDir

 

I would add a line to check the output of FileGetAttrib() so you don't get a false positive/negative from StringInStr()

Edited by Mechaflash
Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

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