copying different extension by using DOS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vanz10
    New Member
    • Jan 2007
    • 3

    copying different extension by using DOS

    HI Everyone, I have an example of how to copy the files by using dos from drive C: to D:, but sad to say i don't know how to copy the different extension by using DOS in the same destination. Can you give me an example
  • link
    New Member
    • Nov 2006
    • 71

    #2
    Originally posted by vanz10
    HI Everyone, I have an example of how to copy the files by using dos from drive C: to D:, but sad to say i don't know how to copy the different extension by using DOS in the same destination. Can you give me an example
    Hi there,

    the same destination? i don't think that is possible unless u will rename the filename or extension name.

    for DOS command:

    type copy filename.ext d:\subfolder

    or type copy/? to view the list of commands for copy command.

    you can use ? and * for wildcards. were ? for single character and * for 2 or more characters.

    Comment

    • bartonc
      Recognized Expert Expert
      • Sep 2006
      • 6478

      #3
      Originally posted by vanz10
      HI Everyone, I have an example of how to copy the files by using dos from drive C: to D:, but sad to say i don't know how to copy the different extension by using DOS in the same destination. Can you give me an example
      Why, for God's sake, would you use DOS for anything?

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        Originally posted by bartonc
        Why, for God's sake, would you use DOS for anything?
        Because it's quicker than Windows by a large cup of tea.

        Also it is useful for automating build processes.

        Comment

        • Cyberdyne
          Recognized Expert Contributor
          • Sep 2006
          • 627

          #5
          Going off topic here guys... =)

          Comment

          • Banfa
            Recognized Expert Expert
            • Feb 2006
            • 9067

            #6
            Not really Windows still has a command line that supports all the old DOS commands, and they are faster than Ex-dragging-my-feet-plorer.

            Comment

            • Cyberdyne
              Recognized Expert Contributor
              • Sep 2006
              • 627

              #7
              Off topic as in a sense of you guys not helping the guy but instead arguing about using or not using DOS.

              Cheers,

              Cyber.

              Comment

              • Killer42
                Recognized Expert Expert
                • Oct 2006
                • 8429

                #8
                Originally posted by vanz10
                HI Everyone, I have an example of how to copy the files by using dos from drive C: to D:, but sad to say i don't know how to copy the different extension by using DOS in the same destination. Can you give me an example
                Could you re-state the question? Or explain differently what you want to do? I don't understand what "copy the different extension by using DOS in the same destination" means. And from the one or two "real" responses, I think you have others confused, as well.

                Comment

                • Banfa
                  Recognized Expert Expert
                  • Feb 2006
                  • 9067

                  #9
                  Originally posted by Cyberdyne
                  Off topic as in a sense of you guys not helping the guy but instead arguing about using or not using DOS.
                  Oh, marginally reasonable point.


                  Right ignoring all the flags that you could use to the copy command it is basically

                  copy <sourceFile> <destination>

                  The sourceFile can optionally include an absolute or relative path, and can include wild cards (* for any number of any character and ? for any single character).

                  Destination can just be a path (absolute or relative) or it can be a new file name (optionally including an absolute or relative path).

                  So to copy to a different extension in the same directory you would just specify both file names including the new extension in the destination.

                  For example to copy from

                  c:\Banfa\cv.doc

                  to

                  c:\Banfa\cv.rtf

                  then you can always use

                  copy c:\Banfa\cv.doc c:\Banfa\cv.rtf

                  If the current directory is already c:\banfa you could also use

                  copy cv.doc cv.rtf
                  or
                  copy .\cv.doc .\cv.rtf
                  . is a directory that exists for every directory which equates to the current directory

                  If the current directory is c:\ you could also use

                  copy Banfa\cv.doc Banfa\cv.rtf

                  If the current directory is c:\temp you could also use

                  copy ..\Banfa\cv.doc ..\Banfa\cv.rtf

                  .. is a directory that exists for every directory (except the root) which equates to the current directories parent directory.

                  Comment

                  Working...