Q:

MS-DOS copy command

Hello this is something that has been on my mind for quite some time. How can you copy just say the first 5 files out of ten with one command. For example:
file1.txt
file2.txt
file3.txt
file4.txt
file5.txt
file6.txt
file7.txt
file8.txt
file9.txt
file10.txt

how can I copy file1.txt through file5.txt only into 
c:\users\person\desktop\folder\

A:

How can you copy just say the first 5 files out of ten with one command

How can I copy file1.txt through file5.txt only into
c:\users\person\desktop\folder\

Solution 1 - From a cmd shell:
for /l %i in (1,1,5) do copy file%i.txt c:\users\person\desktop\folder\

Solution 2 - From a batch file:
@echo off
setlocal enabledelayedexpansion
for /l %%i in (1,1,5) do (
  copy file%%i.txt c:\users\person\desktop\folder\
  )

Further Reading

An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
copy - Copy one or more files to another location.
for /l - Conditionally perform a command for a range of numbers.

