d0n Posted January 6, 2010 Posted January 6, 2010 Hi i am looking to sync 2 files, 1 on my current desktop, the other on a network computer I have something like this, which works for my current computer. However this won't work if i run the program on the network computer because file paths are different. What is a better way to solve this problem? If FileGetTime("\\Main0\_main0\__program\Link.db", 0, 1) > FileGetTime("E:\_Backup\_Autoit\Downloader\Link.db", 0, 1) Then FileCopy("\\Main0\_main0\__program\Link.db", "E:\_Backup\_Autoit\Downloader\Link.db", 1) Else FileCopy("E:\_Backup\_Autoit\Downloader\Link.db", "\\Main0\_main0\__program\Link.db", 1) EndIf
zorphnog Posted January 6, 2010 Posted January 6, 2010 I would use command line parameters to specify the paths, and make a separate batch file for each machine to launch your script with the correct paths. Alternatively, you could create two separate scripts for each machine.
d0n Posted January 6, 2010 Author Posted January 6, 2010 mm nvm apparently this works \\main2\E (E)\_Backup\_Autoit\Downloader\Link.db
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