Thread: Simple copy command

  1. #1
    Registered User
    Join Date
    Mar 2010

    Simple copy command

    Does anybody know the command to copy a simple text file from one directory to another in your file system? I know its pretty basic but having real problems, Thanks

  2. #2
    Registered User
    Join Date
    Feb 2010

    Copying file:

    You can copy the file from one directory to other using the following command.

    cp sourcedirectoryname/sourcefilename destinationdirectory

  3. #3
    Registered User
    Join Date
    Aug 2007
    MD, USA
    in msdos terminal it's VERY different: (note the good old uncomfortable backslash)
    copy sourcedirectoryname\sourcefilename destinationdirectory

  4. #4
    Registered User
    Join Date
    Sep 2008
    Toronto, Canada
    A rename would be even better as long as it's on the same drive.

  5. #5
    and the hat of sweating
    Join Date
    Aug 2007
    Toronto, ON
    Quote Originally Posted by nonoob View Post
    A rename would be even better as long as it's on the same drive.
    I think you'll need to elaborate about why that's better, because it doesn't make much sense to me.
    Renaming the file wouldn't copy it.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  6. #6
    Registered User
    Join Date
    Jun 2005
    I'd suggest this discussion is misplaced in the C programming forum. The method to copy a file from the command line varies between operating systems and, to some extent, between command line interpreters (aka shells).
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 07-05-2010, 10:43 AM
  2. Converting MINI-BASIC in MASM over to C++?
    By Paul Panks in forum Projects and Job Recruitment
    Replies: 405
    Last Post: 07-04-2009, 05:41 PM
  3. help
    By hellBOY in forum C Programming
    Replies: 4
    Last Post: 01-13-2009, 11:59 AM
  4. parsing command line strings
    By John_L in forum C Programming
    Replies: 15
    Last Post: 05-28-2008, 08:26 AM
  5. copy = concatenate ?
    By Arruba in forum C Programming
    Replies: 3
    Last Post: 11-03-2006, 04:54 PM