Jump to content
Sign in to follow this  
fraudh8er

How to check to see if a file is empty or not

Recommended Posts

I have been trying to do this with no good results. you think i would be able to figoure out how to check for EOF and see if that value is 0. but the over all quesiton is if that will actually work?

thanks for all you help

Share this post


Link to post
Share on other sites

Dim $Filename, $FileSize
$Filename = @DesktopDir & "\Test.ini"
$FileSize = FileGetSize($Filename)
If $FileSize <= 1 Then MsgBox(64, "Test", "I'm pretty sure the file is empty.")

Share this post


Link to post
Share on other sites

thanks

Dim $Filename, $FileSize
$Filename = @DesktopDir & "\Test.ini"
$FileSize = FileGetSize($Filename)
If $FileSize <= 1 Then MsgBox(64, "Test", "I'm pretty sure the file is empty.")

<{POST_SNAPBACK}>

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...