Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Is there a way to copy a whole directory, files and subdirectories excluding a particular filename extension?
I want to copy all the dirs,files and subsdirs, but omit all files with .WRK extension. I am starting to think that this is easier to do with Linux and bash script...

DOS 6.0 unlikely:
.WRK is Windows Software Extension........

The 16bit version of XXCOPY will not work under NT O/Ses.........
DOS6.0 what is the real version ???

Thanks for all your replies.
I need Long File Name support and LFNDOS and DOSLFN are pretty flakey.
I tried xxcopy, which works but is terribly slow and has no Long File Name support. I have also tried xcopy using both DOSLFN and LFNDOS.
I am having the best results using LCOPY from LFNTOOLS (lfntools.sourceforge.net - GPL license) because it supports long filenames. It is also 20x faster than xxcopy. My only problem now is omitting certain file extensions with the copy- which is a big task in DOS.
To get this working, I think that I would have to dump a directory and file listing into a file then parse it in and check for a .WRK extension. This is A LOT of work in DOS for something that is simple, so I think I'll just drop it and do it with a Linux bash script.
DOS is v 6.22 BTW.
Thanks for all the help.

I don't see how you'll be able to use any utility to copy long file names since you're doing it from 6.22.

You can access NTFS drives with a program
called NTFS4DOS. You can download it for free. The program makes a bootdisk.
You can boot with any DOS disc and just
run the file NTFS4DOS.exe file. You then
have your NTFS drives.Xfactor

Maybe I'm missing something but I think we're talking about dos 6.22 (which has no LFN support) and not an NTFS OS.

YEP, yet again trying to access NT O/Ses with a **-DOS Boot Disk.
Absolutely nothing to do with MS-DOS 6.22 par-se, a misguided OP!

NTFS4dos will read LFN. and won't rename the file.
It does such a good job that I Defrag
windows XP, Xp64bit 3.11, fat adn fat32 drives.
they boot just fine.
It can be done,
Xfactor

It's been awhile since I've used NTFS4DOS but as I recall, on the menu that first comes up you can choose to defrag. That defrag utility does preserve LFN. However its COPY command is a regular win 95 command and doesn't keep the LFN. Also I had problems with a simple COPY *.* . It would copy some but rarely all of the files in a directory. The rest I had to copy one at a time.
But my point is, since dos 6.22 doesn't create long file names there no reason to look for a copying utility that preserves LFN, nor will you find any that will work within dos 6.22.
Now maybe the poster is using another OS but for some reason wants to use dos 6.22 to copy the files. If that's the case he should have said so and maybe we could have provided better info.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |