7of9121098
asked on
copy files from one domain to another domain
What If the I'm on two different domains(Access) and I want to copy one file from a machine in one domain to another machine in another domain. How would I create a batch file, what commands?
You need to be a little more detailed. Do you already have trust relationships set up? Are you trying to do this as part of a login script? A little more information is required.
ASKER
Pschawan, this is no login script, All I want to do is create a batch file that copies one file from one domain(Machine1) to another domain (Machinee2). What do you mean by trust relationships? I'm able to browse the two domains in the Microsoft Network Neighbor hood. I would like to see the syntax with an example. Thanks.
I'm guessing, based on the description you just gave, that you don't have domains set up here. I'm assuming you mean two different machines when you say "domains".
Try the following in the batch file:
net use T: \\Machine2\[share]
copy [file] t:
net use t: /delete
In this example, [share] represents the name of a shared directory created on the second machine and [file] is the name of the file you want to copy there. This will map a drive, copy the file, and then delete the mapping. Let me know if you are unsure how to share directories.
If I'm incorrect and you actually have two domain controllers set up with two different domains, or if you want more info, go to the command prompt and type NET USE /?
Try the following in the batch file:
net use T: \\Machine2\[share]
copy [file] t:
net use t: /delete
In this example, [share] represents the name of a shared directory created on the second machine and [file] is the name of the file you want to copy there. This will map a drive, copy the file, and then delete the mapping. Let me know if you are unsure how to share directories.
If I'm incorrect and you actually have two domain controllers set up with two different domains, or if you want more info, go to the command prompt and type NET USE /?
or
copy \\machine1\share\file \\machine2\share\file
Mark
copy \\machine1\share\file \\machine2\share\file
Mark
There is a lot other way transfer files, email, FTP etc.
Depends how big is the file, how regular it need to be transfer.
Depends how big is the file, how regular it need to be transfer.
And if your actuall account have no access to the domains:
net use T: \\M1\S1 P1 /user:U1
net use U: \\M2\S2 P2 /user:U2
copy T:\file U:
net use T: /delete
net use U: /delete
Mx Machine 1-2
Sx Share 1-2
P1 Password 1-2
U1 Username 1-2
bye cbo
net use T: \\M1\S1 P1 /user:U1
net use U: \\M2\S2 P2 /user:U2
copy T:\file U:
net use T: /delete
net use U: /delete
Mx Machine 1-2
Sx Share 1-2
P1 Password 1-2
U1 Username 1-2
bye cbo
Px Password 1-2
Ux Username 1-2
:-)
Ux Username 1-2
:-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks got it guys
Hi Tim_Holman,I think the password is on wrong place...
cbo
cbo
Ooops !
My mistake - either way works, but you do need to specify the domain in order to connect to another domain's resources with which your domain does not have a trust relationship.
My mistake - either way works, but you do need to specify the domain in order to connect to another domain's resources with which your domain does not have a trust relationship.