Page 1 of 1 1
Topic Options
#32254 - 2002-11-12 03:20 PM compare files - how ?
Anonymous
Unregistered


Hia all,

I am new in the kix32 thing so any help would be fine. Following problem is something I need to be able to solve.
I would like that kix32 saves some files from clientpc to server. Those files are in various directory's and in various numbres. The meaning is to back-up saved games from cleint pc's and save those to server. Later when that cleint returns, those files have to be taken from the server and replaced in their original directory's. All dir's stay the same every time the client logs in and logs out. (saved games usual stay in the prefixed dir's)
Anyone could help me on this? I begin with a batch script in logon becauze that's the way I can replace certain cfg files for diffirent games. Client has NO permission to write to local hard drive, but only to write to his/her own homedrive on the networkserver. But when client wants to save game within the game itself, then he is able to do so. Many game run by runas.

Top
#32255 - 2002-11-12 03:21 PM Re: compare files - how ?
Anonymous
Unregistered


I forgot to tell that all clients are windows2000 pro and the server is windows2000 server.
Top
#32256 - 2002-11-12 04:01 PM Re: compare files - how ?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Run a logoff script that copies the files from the saved games folder to the users network folder. You the remove the files on the client PC. Upon login, the files are then copied back from the network folder into the local computers folders. Very straightforward stuff.
_________________________
There are two types of vessels, submarines and targets.

Top
#32257 - 2002-11-12 04:21 PM Re: compare files - how ?
Anonymous
Unregistered


Hi Jens,

That part was the easy part and I thought likewise. But the part where I am totaly new is the part where date's are compared. So I would only copy files back to the server that are changed during the time that user was on the computer. The copy part i've already written in a batch, but the file compare thing is brand new to me and therefour I could use some help. I don't want every time that all file's are copied from server to to client and vice versa. just the files that are changed (alterd). In the logon there will all the copie be done, to make sure he has the latest files in his saved games. But in the logof we need to check the time/date. Sorry for my poor Englisch, I am trying to :-)

Top
#32258 - 2002-11-12 04:26 PM Re: compare files - how ?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Why not just enable offline folders?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#32259 - 2002-11-12 04:26 PM Re: compare files - how ?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
The easiest way would be to use XCOPY in combination with the /D parameter. This will only copy changed files (determined by the last-modified date stamp). Check all available XCOPY parameters with XCOPY /? at the command prompt.

However, if you do not remove the saved files on the client computer, then all users will have access to all saved files for all users. I don't think you want that? If you do, then what's the point of copying the saved files to the user's network staorage?
_________________________
There are two types of vessels, submarines and targets.

Top
#32260 - 2002-11-12 04:47 PM Re: compare files - how ?
Anonymous
Unregistered


The files should be removed from the local computer when login is done. So user1's data is on the computer and when user2 logs in then first off al , the data will be deleted to make sure those folders are epmty when copying his saved games into the dir's.
The delete of saved games can also be done on logg-off from user1.

Top
#32261 - 2002-11-12 04:53 PM Re: compare files - how ?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Then you will have to copy your file every time anyway, then checking for changed files is no good.
_________________________
There are two types of vessels, submarines and targets.

Top
#32262 - 2002-11-12 05:18 PM Re: compare files - how ?
Anonymous
Unregistered


Jens,

Data1 of user1 isn't alway's changed. So in the logon this data will be taken from te server and put localy on a client. But when user1 stops, it doens't mean that data1, or part of data1 has been changed. And to avoid useless networktraffic I thought to delete not changed data1 from local hd and copy changed data1 towards server. So data1 that isn't changed just delete. We are talking about several games, and the user is free to play what he wants. When the user has saved games of (example) warcraft3 but not of gta3 then the data of warcraft3 has to go on the server and the data of GTA3 has to be deleted from the local client. Therefor I need to check data's on the files. Sorta if then , else. IF data is newer then old data THEN copy to server ELSE delete data. That kinda syntax is needed :-)

Top
#32263 - 2002-11-12 06:22 PM Re: compare files - how ?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Again, look into the use of XCOPY /D since it will do exactly want you need, namlely just copy files that have changed in the source directory but not in the target directory.

Addendum: You mention that the user has no permission to write to the disk. This will imply that you'll need to use either SU or the Task Scheduler to run the synchronization script, it cannot be used during the logon process. You will have the same issue during logoff due to your particular set of permissisons.

[ 12. November 2002, 18:24: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#32264 - 2002-11-12 06:40 PM Re: compare files - how ?
Anonymous
Unregistered


Jens,

You are completely right on the xcopy command. I was not so familiar with all those xcopy variables and looked into that. It works perfectly with xcopy. The logon and logoff script will get a su command to be able to copy all data onto server and local hd. :-)

next question :-)
Kix can determine what user logged on. The name of his logon will be the same as the name of his homedrive. So when user logs on the homedrive will be used as storage for all files. Now that I think of it, the user will get his H drive (will be set as homedrive) with the login procedure of win2000, so I won't need actualy to use this info, becauze the w2k will do that when the user logs on and every user will get his own batch file to do so. correct me if I am wrong in this one :-)

But that first login will be the tricky part, because there will be asked for information like, hotmail adress (for trillian users), login name for trillian, password for trillian and all that has to be written into a ini file that can be found on trillian. But also there in the setup of trillian, the location can be chosen where that program has to be installed and all files (even those damm DLL's) goes into 1 dir. So every user can use his own ini files. Something I must check. more later :-)

Top
#32265 - 2002-11-12 08:39 PM Re: compare files - how ?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Put their .INI file into the user's personal folder. As soon as they log on, you can map to that folder and then read/write the .INI file. This way they don't have to enter the info over and over again.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.114 seconds in which 0.08 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org