#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0

    Help with command line interface


    Hi all,

    I'm currently going through an online program designed to teach me how to use the windows 7 command line interface.

    In my desktop, I have two folders, A & B. I'm being asked to copy a txt file from folder A to folder B. I don't know how to do this with just the cp command.

    Help appreciated!
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,053
    Rep Power
    9398
    I bet you're having problems because cp isn't a Windows command.

    Code:
    copy source destination
    Can't be that hard to get it wrong...
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0
    Originally Posted by requinix
    I bet you're having problems because cp isn't a Windows command.

    Code:
    copy source destination
    Can't be that hard to get it wrong...
    And when I do that, all I do is make a copy of the file, but in the same folder. It doesn't move it into the other folder I want it to.
  6. #4
  7. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,053
    Rep Power
    9398
    So make the destination include the path to the folder where you want it copied. You can pass in entire path structures to copy (and practically every single file command), not just the names of the files.
  8. #5
  9. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,436
    Rep Power
    4539
    There is pretty extensive online help about using the command line in windows help. You can usually enter <command> /? to get immediate help on the command in question too. If the help scrolls, try
    Code:
    <command> /? | more
    to get a paged output
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo