alanbr00 Posted October 16, 2019 Posted October 16, 2019 Hi, I'm trying to compare 2 modified dates, i wanna know just when they are equal or not. Always says that it's "Equal", i have changed all dates possible and still did not change the result. #include <Date.au3> $sFile1=@ScriptDir&"C:\folder\file1.exe" $sFile2=@ProgramFilesDir&"C:\folder\file2.exe" $FileTime1 = FileGetTime("CC:\folder\file1.exe", 0, 1) $FileTime2 = FileGetTime("C:\folder\file2.exe", 0, 1) If $FileTime1=$FileTime2 Then MsgBox(0, "Title", "EQUAL", 10) Else MsgBox(0, "Title", "DIFFERENT", 10) EndIf
Davidowicza Posted October 16, 2019 Posted October 16, 2019 When seeing if strings are equal you need to use the StringCompare() function.
iamtheky Posted October 16, 2019 Posted October 16, 2019 The first filegettime is pointed at a path that doesnt exist, and im going to guess the second file does not exist in that location either, and two wrongs make a true. Also sFile1 and sFile2 are wrong, go read how to use the macros. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
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