DarkBoost Posted January 31, 2009 Share Posted January 31, 2009 (edited) As per the attachment it does not appear to obtain the FileGetVersion after a FileCopy even running a Loop & Sleep statement. Any ideas? Edited January 31, 2009 by DarkBoost Link to comment Share on other sites More sharing options...
Skruge Posted January 31, 2009 Share Posted January 31, 2009 As per the attachment it does not appear to obtain the FileGetVersion after a FileCopy even running a Loop & Sleep statement. Any ideas?Looks like you're reading the version before the copy, so the file doesn't exist. [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
nfaustin Posted January 31, 2009 Share Posted January 31, 2009 Place the FileGetVersion inside the If statement before it exit the loop. [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font] Link to comment Share on other sites More sharing options...
DarkBoost Posted January 31, 2009 Author Share Posted January 31, 2009 (edited) I have managed to get past this, however wondering if this may be a little long-winded? $file = "example.exe" $path = @ScriptDir&"\" $pathtest = @ScriptDir&"\test\" version();check if file exists -> test\example.exe If FileCopy($path&$file, $pathtest, 8) = 0 Then Exit;copy file to folder -> test While 1 If FileExists($pathtest&$file) Then ExitLoop;loop script until file exists WEnd version();check if file exists -> test\example.exe Func version() $version = FileGetVersion($pathtest&$file) If FileExists($pathtest&$file) Then MsgBox(0, "", $version);show version of copied file EndFunc Edited January 31, 2009 by DarkBoost Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now