X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Rod Pemberton" Newsgroups: comp.os.msdos.djgpp Subject: Re: VirtualBox DOS how can I copy a piece of tree? Date: Sun, 20 Feb 2011 22:53:23 -0500 Organization: Aioe.org NNTP Server Lines: 109 Message-ID: References: <566325 DOT 51644 DOT qm AT web45105 DOT mail DOT sp1 DOT yahoo DOT com> NNTP-Posting-Host: sg0uvLzlDfZOqmCSVnJXCA.user.speranza.aioe.org X-Complaints-To: abuse AT aioe DOT org X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.2001 X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Microsoft Outlook Express 6.00.2800.2001 X-Priority: 3 X-MSMail-Priority: Normal Bytes: 5504 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Pablo Marty" wrote in message news:566325 DOT 51644 DOT qm AT web45105 DOT mail DOT sp1 DOT yahoo DOT com... > > can someone tell me how to copy a directory with all its subdirectories and files in FreeDOS with VB? I have the DJGPP folder in my CD and want to transfer it complete to my VHD with just one command > That's not related to DJGPP... I'd suggest asking some questions in a dedicated VirtualBox forum. So far, I've not seen anyone here indicate they are familiar with VirtualBox. ******* I'm not sure how VB (VirtualBox, not Visual Basic...) affects your situation. If VB allows to see your normal DOS directories, the progams mentioned later will work for you. E.g., VB may have an option to "mount" that directory virtually in VB. But, if it's like most other emulators, you'll need to create an "image", i.e., a file that contains a filesystem and files, and copy the directory to the filesystem in the image, then tell the emulator how you want that image file to be recognized. E.g., you could create a ramdisk in DOS, format it, copy directory to the ramdisk, then copy the ramdisk as an image to a file, perhaps using Rawread.exe, or John Fine's Partcopy.exe, etc. Then, you tell the emulator what to do with the image. You also said the folder is on a CD, so you'll have to correctly setup MSCDEX and your CD-ROM driver. If it's not a Joliet CD, i.e., ISO9660, your LFNs may be incorrect, or missing for the DJGPP files. If it's a Joliet CD, you'll need a special drivers to recognize Joliet in DOS, e.g., GCDROM.sys CD-ROM driver, SHSUCDX.exe replacement for MSCDEX w/Joliet support, and DOSLFN w/Joliet support. IMO, the easiest method to copy a directory and it's subdirectories is LCOPY. But, this is for normal DOS. LCOPY is a LFN (Long FileNames) copy program written by Ortwin "Odi" Glück (or Glueck). It's powerful enough that you can copy the entire Windows 98 system directory while in pure DOS without any errors, mis-named files, missing files, with all hidden files, with correct SFNs and LFNs, dates, times, etc. AFAIK, *NO* other tool can do that. I've tried all the DJGPP ported GNU tools, PKZIP, and numerous others, etc. *Everything* except LCOPY will fail on properly archiving or copying a Windows 98 system directory. I.e., it works. If you're in real DOS and not in a Windows DOS-box, you'll also need an LFN driver to provide LFNs to LFN compatible tools. If the tools you use aren't LFN compatible, they won't copy LFNs even with the LFN driver loaded. Jason Hood's extended version of Henrik Haftman's DOSLFN works well. You could also use the last version of PKZIP and PKUNZIP, if you can find it, 2.50. It's easy to use also. It has options to archive and recurse without compression. So, you just tell PKZIP to do that, then copy the archive to where you want it, delete the first version, move to the current version, then PKUNZIP it. As long as you're not doing a Windows system directory, this will work just fine. If you want or need to use DJGPP tools, you'll probably have to use DJTAR and optionally GZIP. DJTAR is a LFN aware clone of TAR. So, you'll still need DOSLFN. TAR packages the files into an uncompressed archive. GZIP compresses them. GZIP is optional, but may reduce the time to copy the TAR archive to the new location. You could use CPIO instead of TAR. That may be easier. If using TAR or CPIO, you'll still have to use a procedure similar to PKZIP, i.e., create an archive, copy it, delete the first version, uncompress it. If you were extracting from .zip files, not moving them, others here would tell you to use the DJGPP port of Info-ZIP, i.e., UNZIP32, since it too supposedly is LFN aware. Odi's LFN tools http://lfntools.sourceforge.net/ Henrik Haftman/Jason Hood DOSLFN http://adoxa.110mb.com/doslfn/index.html e.g., using DOSLFN and LCOPY: DOSLFN LCOPY/S/A/V C:\directory_to_copy\* C:\directory_to_place /V is optional depending on your XMS client, or needed if you have don't have one installed. That'll copy all files and subdirectories with their LFNs. Note that LCOPY uses a single asterisk *, not *.* like most DOS utilities. I recommend that method. e.g., using DOSLFN and PKZIP: DOSLFN CD C:\directory_to_copy PKZIP -a -e0 -p -r ARCHIVE.ZIP *.* COPY/V ARCHIVE.ZIP C:\directory_to_place DEL ARCHIVE.ZIP CD C:\directory_to_place PKUNZIP -e -d ARCHIVE.ZIP This is a good alternate. Someone else can provide the TAR/GZIP/CPIO arguments, if needed. Obviously, the utilities need to be in one of the directories of your DOS %PATH% variable. Rod Pemberton