0

I need to copy the files with filenames that have four characters or less and .TMP extension into a folder. Can this be done with one command if they are in one location?

1
  • 1
    What research have you done? Have you tried anything?
    – CharlieRB
    Commented Apr 12, 2015 at 21:44

1 Answer 1

1

The answer is:

COPY [SOURCE]\????.TMP [DESTINATION]

Where [SOURCE] is the source drive/folder and [DESTINATION] is the destination drive/folder.

5
  • Sorry Im really new at this so hang with me here. When I run dir COPY [SOURCE]\????.TMP [DESTINATION] first its pulling more than four character files names.
    – OCGIRL
    Commented Apr 12, 2015 at 22:02
  • @OCGIRL: Don't combine dir and copy obviously, since they are separate commands. Just try dir [SOURCE]\????.TMP
    – Karan
    Commented Apr 12, 2015 at 22:08
  • lol no I didn't combine copy and dir. I'm new but not that much of a newbie. Thanks again.
    – OCGIRL
    Commented Apr 12, 2015 at 22:11
  • @OCGIRL: Your comment above strongly suggested you did combine them, since you used dir copy ..., unless you meant that you ran those two commands separately which wasn't at all clear. Anyway, good that you got it to work. Don't forget to thank RockPaperLizard by accepting his answer.
    – Karan
    Commented Apr 12, 2015 at 22:23
  • @OCGIRL Glad it worked for you :-) Happy to help. Commented Apr 16, 2015 at 1:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .