cayoda Member 2 Sep 15, 2008 #1 I Need a help with conditions. I need a condition code If one file exist on Game Directory and if the file size is bigger than 1mb. Thanks =P :lol:
I Need a help with conditions. I need a condition code If one file exist on Game Directory and if the file size is bigger than 1mb. Thanks =P :lol:
Sarkilas Member 415 Sep 15, 2008 #2 Use this: Code: f = File.exist?("File.txt") size = 0 size = File.size("File.txt") if f if f and (size/1024.0/1024.0) >= 1 Â # do something end Hope this helps. Upvote 0 Downvote
Use this: Code: f = File.exist?("File.txt") size = 0 size = File.size("File.txt") if f if f and (size/1024.0/1024.0) >= 1 Â # do something end Hope this helps.
cayoda Member 2 Sep 15, 2008 #3 This is can be usable for DLL for sample Code: f = File.exist?("MMONET.dll") # etc.. Upvote 0 Downvote