#53169 - 2001-01-12 10:18 PM
xcopy?
|
brewdude6
Hey THIS is FUN
Registered: 2000-10-21
Posts: 280
Loc: Nashville, TN
|
OK..here we go again!Problem: I need to compare two directories. One on the client, one on the server. I need to copy down any newer dated files (easy enough), but if the folders don't exist on the client I can't copy them down. I have gotten it to work for copying empty folders and not the file...and that would work, but I need to be able to copy down any NEW files if files exist within the folder on the client machine. Anybody have any ideas on the best way to approach this?
_________________________
I could have made a neat retort but didn't, for I was flurried and didn't think of it till I was downstairs. -Mark Twain
|
|
Top
|
|
|
|
#53170 - 2001-01-12 11:48 PM
Re: xcopy?
|
BoxKite
Da Box
   
Registered: 2000-05-17
Posts: 282
Loc: Vacaville,CA,USA
|
I am about to suggest something I haven't tried, but sounds like it will work. I have Directory Replication set up between my PDC and BDC.Replication checks to see if the destination files are the same as the source files. Any differences are corrected to the state of the source files. That is: "anyfile.txt" in the destination is changed to the copy in the source location. "anyfile.txt" not in the destination location is copied to the destination. "anyfile.txt" not in the source location, but in the destination location is deleted. You can setup server to client replication. You will be dealing with Server manager on the server, and Server in Control Panel on the client. You can add code to your logon script that will copy the files from the imported location to the location you desire. If you have never setup replication you will have a chore, but one that can be done. Luck 
------------------ Box FACTA NON VERBA
_________________________
Box FACTA NON VERBA
|
|
Top
|
|
|
|
#53171 - 2001-01-13 04:10 PM
Re: xcopy?
|
JensKalski
Starting to like KiXtart
Registered: 2000-12-13
Posts: 186
Loc: Germany
|
Hello, I think, you can use xcopy with the options /d for copying only newer files and /u for copying only files that are existing at the targetdirectory.------------------
Jens Kalski eMail: jens@kalski.de homepage: http://www.kalski.de/
_________________________
Jens Kalski
|
|
Top
|
|
|
|
#53173 - 2001-01-13 07:48 PM
Re: xcopy?
|
Anonymous
Anonymous
Unregistered
|
$patch=COMPAREFILETIMES(@LDRIVE + "\commands\shutgui.exe","c:\winnt\system32\shutgui.exe") IF ($patch=1 or $patch=-3) COPY @LDRIVE + "commands\shutgui.exe" "c:\winnt\system32\shutgui.exe" $X = "Copied ShutGui" GOSUB DISP ENDIF
|
|
Top
|
|
|
|
#53176 - 2001-01-15 11:02 PM
Re: xcopy?
|
DrillSergeant
MM club member
   
Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
|
As much as I hate s(h)elling out...ROBOCOPY rules!! I use it for almost every copy-command. Just be sure to use the right options. (Default is a million retries... If it can't be copied after ten retries it ain't gonna happen.) ------------------ Greetz, Roger the Young ------------------------ The code is out there... ------------------------
_________________________
The Code is out there
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1045 anonymous users online.
|
|
|