Name: nmv Date: April 16, 2007 at 20:24:59 Pacific Subject: Copy whole dir and subdirs OS: DOS 6.0 CPU/Ram: Duron 800
Comment:
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...
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.
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.
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,
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.