looking for a batch technique to take files from one w2k server to another

  • Thread starter Thread starter jctown
  • Start date Start date
J

jctown

If I have a "config" file that tells me source and destination of a
bunch of files I want to deploy from one W2K server to another, is
there any easy way to do it? I used a ksh script under SFU and was
able to create an ftp script, but it's really flaky and people who are
using it don't like having to do so much config on their own. I'd
rather have something like a "make" file that ant uses but I'm not
familiar enough with ant to write something. So I'm looking for a tool
or product that is open source that will let me feed it a config file,
source server and dest server and have it do the work for me.
 
If I have a "config" file that tells me source and destination of a
bunch of files I want to deploy from one W2K server to another, is
there any easy way to do it? I used a ksh script under SFU and was
able to create an ftp script, but it's really flaky and people who are
using it don't like having to do so much config on their own. I'd
rather have something like a "make" file that ant uses but I'm not
familiar enough with ant to write something. So I'm looking for a tool
or product that is open source that will let me feed it a config file,
source server and dest server and have it do the work for me.

http://www.microsoft.com/windowsxp/using/digitalphotography/prophoto/synctoy.mspx

I've used this to transfer files in the past, nice and easy.
 
If I have a "config" file that tells me source and destination of a
bunch of files I want to deploy from one W2K server to another, is
there any easy way to do it? I used a ksh script under SFU and was
able to create an ftp script, but it's really flaky and people who are
using it don't like having to do so much config on their own. I'd
rather have something like a "make" file that ant uses but I'm not
familiar enough with ant to write something. So I'm looking for a tool
or product that is open source that will let me feed it a config file,
source server and dest server and have it do the work for me.

Let's have a look at your "config" file.
 
Basically all my config file is going to do is list source and
destination directories
Similar to this

E:\Dir1\Dir2\Dir3\file1.type E:\Dir1\Dir2\Dir3\file1.type
E:\Dir1\Dir2\file2.type E:\Dir1\Dir2\Dire\file2.type
 
Basically all my config file is going to do is list source and
destination directories
Similar to this

E:\Dir1\Dir2\Dir3\file1.type E:\Dir1\Dir2\Dir3\file1.type
E:\Dir1\Dir2\file2.type E:\Dir1\Dir2\Dire\file2.type

Try this batch file:

Line1 @echo off
Line2 for /F "tokens=1-2" %%a in (c:\config.txt) do echo xcopy /s /e /d /c
%%a\*.* %%b\

Note:
- Your directories must NOT have any embedded spaces.
- Remove the line markers.
- Remove the word "echo" to activate the batch file.
 
Hi, will this work if the source and destination directories are on two
different servers on the same TCP/IP network?

PS - Yes... I'm the same person as originally posted.

See that's one of the issues with this whole process.. I need to be
able to
a) backup the existing files that are being overwritten
b) ensure permissions are ok

I was thinking about using ant to do it but I'm not sure if even ANT is
robust enough.
 
Hi, will this work if the source and destination directories are on two
different servers on the same TCP/IP network?

PS - Yes... I'm the same person as originally posted.

See that's one of the issues with this whole process.. I need to be
able to
a) backup the existing files that are being overwritten
b) ensure permissions are ok

I was thinking about using ant to do it but I'm not sure if even ANT is
robust enough.

You're making these points:
a) backup the existing files that are being overwritten
=> This does not mean anything to me - please rephrase.

b) ensure permissions are ok
=> What does "ensure" mean? - please rephrase.

If the destination folders reside on a different server then
you simply put this server's name into the batch file like so:

Line1 @echo off
Line2 for /F "tokens=1-2" %%a in (c:\config.txt) do echo xcopy /s /e /d /c
%%a\*.* \\SomeServer\%%b\
 
Back
Top