Sign in to follow this  
Followers 0
ken82m

Compare Two Arrays Filegetsize

3 posts in this topic

Does anyone have an easy way of doing this? this whole array thing is giving me a headache! (I'm an idiot so take me to judge judy lol)

okay I have File A and File B.

File A is on my server

File B is a temporary copy on my local PC

I want to do a FileGetTime on both copies of the files and determine if File B was modified more recently than File A if it was I would then copy File B up to the server

Thanks Again,

Kenny


My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

didn't test it but something like this should work i think:

$FNa = " f:\file1.txt" 
$FNb = " c:\file1.txt" 
$Fa=FileGetTime ( $FNa )
$Fb=FileGetTime ( $FNb )
$Da = Int($Fa[0] & $Fa[1] & $Fa[2] & $Fa[3] & $Fa[4] & $Fa[5])
$Db = Int($Fb[0] & $Fb[1] & $Fb[2] & $Fb[3] & $Fb[4] & $Fb[5])
If $db > $da then FileCopy($FNb,$FNa,1)
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

perfect, thanks

about the only thing I can do without testing is MSGBOX(4096,"", "This is a box")

:whistle:

Thanks again,

Kenny


My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

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  
Followers 0