4
1
When I use copy *.txt somefolder\
the system seems to copy all *.txt~
files too, which is not what I want. A similar same effect can be seen with dir
:
C:\Users\Paul\Documents\Programs\Proffy>dir *.txt
Volume in drive C is Vista
Volume Serial Number is EC23-AD6B
Directory of C:\Users\Paul\Documents\Programs\Proffy
29/11/2008 13:54 35,821 COPYING.txt
31/10/2009 21:54 1,644 INSTRUCTIONS.txt
06/06/2009 15:57 1,393 INSTRUCTIONS.txt~
04/01/2009 11:59 116 Notes.txt
19/04/2009 16:53 134 README.txt
04/01/2009 12:42 132 README.txt~
31/10/2009 21:30 197 TODO.txt
31/10/2009 19:10 414 TODO.txt~
8 File(s) 39,851 bytes
0 Dir(s) 41,938,862,080 bytes free
C:\Users\Paul\Documents\Programs\Proffy>
How can I get dir
and copy
to only operate on files that end with .txt
and not .txt~
?
1When I first saw this question, I thought 'yes, that's useful and clear' so I upvoted it. Then I started adding an answer which was coming to the conclusion 'they're treated as special to remind you to rename or delete them'. While I was editing, someone downvoted me, with no comment to explain why. This leaves a nasty taste in my mouth, but I got the message 'help not wanted'. – pavium – 2009-10-31T22:37:42.990