May 29, 2007 at 2:35 pm
How to copy the .bak file from another computer(which is on differnt domain)
to local computer using windows commands. I would like to do that file copy
using command prompt.
Here is what I wanted to do:
1) logon to different computer(in different domain)
2) copy the file to local compute
3) disconnect the connection to that computer.
Thanks,
Ramu
May 29, 2007 at 3:37 pm
Check out XCOPY at this link...
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true
That will give you a start with how to copy the file(s) using a command line.
-SQLBill
May 30, 2007 at 6:41 am
Hi
-------------------------------------------------------
net use x: \\server\share /user:domain\login password
copy x:\path\file c:\path\file /y
or
xcopy x:\path\file c:\path\file
or
robocopy x:\path\file c:\path\file
net use x: /delete
------------------------------------------------------
The green stuff needs to be changed, the rest is syntax.
use the one copy-command that meets your needs...
regards
karl
Best regards
karl
May 30, 2007 at 10:30 am
How about the 'old school' way ...
C:\>copy /?
Copies one or more files to another location.
COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
[+ source [/A | /B] [+ ...]] [destination [/A | /B]]
source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
/D Allow the destination file to be created decrypted
destination Specifies the directory and/or filename for the new file(s).
/V Verifies that new files are written correctly.
/N Uses short filename, if available, when copying a file with a
non-8dot3 name.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.
/Z Copies networked files in restartable mode.
The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line. Default is
to prompt on overwrites unless COPY command is being executed from
within a batch script.
To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format).
C:\>
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
June 1, 2007 at 7:57 am
copy command will not work because the file I wanted to copy is on another domain where I need to provide userid/login. So, NET USE will be the only option.....it looks like.
Thanks,
Ramu
June 1, 2007 at 1:01 pm
"net use" merely establishes and vailidates your credentials and access to the resource. You still have to copy something it appears whether you use robo-copy, xcopy or copy.
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
June 1, 2007 at 2:47 pm
You are right. NET USE merely opens a connection to that share and afterwards COPY will do the copy.
June 4, 2007 at 9:19 am
Another option is to use ROBOCOPY, which ships with the Windows Server products (http://www.microsoft.com/technet/technetmag/issues/2006/11/UtilitySpotlight/). It has both GUI and command line options.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply