Using command prompt to sent/receive file

Posted on 2003-02-19
Medium Priority
Last Modified: 2010-03-19
Using the command prompt..
how can i sent a file/folder or vice versa??
I am under a LAN..although I know tat i can share files with my local friends but I want to learn the command prompt way....

izzit something like:  net file?
or whatever..

thanks.....need you experts help
Question by:joely2k
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 79

Accepted Solution

lrmoore earned 80 total points
ID: 7982839
First, map a drive:
C:\>net use M: \\server\share
Command completed successfully

Then just use copy command
C:\>copy file.doc M:
C:\>copy C:\data\file.xls M:\data
C:\>copy M:\data\file.bat C:\data

C:\>copy /?
Copies one or more files to another location.

COPY [/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.
  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).


LVL 79

Expert Comment

ID: 7982847
You can also just use UNC instead of mapping a drive:

C:\>copy c:\data\file.doc \\server\share\data
C:\>copy \\server\share\data C:\data


Author Comment

ID: 7985847
what is the meaning by mapping the drive?

LVL 79

Expert Comment

ID: 7988952
If I "map" a drive, I am creating a new drive letter that my PC will uses as if it was a real local drive. Then, I can copy files back/forth, run executables, etc just by changing location to that drive letter:

C:\>net use M: \\server\share
The command completed successfully

M:\>dir (same commands that are available to me from the C:\> local drive prompt.


Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question