On Aug 23, 1:40 am, Marco van de Voort <mar...@[EMAIL PROTECTED]
> wrote:
> On 2007-08-22, Jim Leonard <MobyGa...@[EMAIL PROTECTED]
> wrote:
>
> >> No with Borland Pascal (with BP, there are LFN units but these only
work
> >> under Windows 9x).
>
> > Crap. Isn't there some interrupt I can call, some memory structure I
> > can inspect, etc.?
>
> > If not, I would want to write the utility for regular DOS for
> > prototyping and testing, then add conditional compile defines for a
> > windows compiler. Would FreePascal be the "closest" to Borland, or
> > should I try some other compiler? It's a recursive file copying
> > utility that I plan to write, so ideally I'd need sup****t for
> > "findfirst", "findnext", etc.
>
> Free Pascal is slightly more compatible to Borland Pascal than Delphi
(e.g.
> has a sup****ted units DOS and CRT, as well as a TV substitute).
>
> BUTt unless you really need that compability because the source is very
> large, I'd modernize it straight to the Delphi dialect, using sysutils.
Be
> it with FPC or Delphi. Note that with FPC such a transition is gradual,
TP
> dialect and Delphi-dialect code can coexist in one binary.
>
> (e.g. 16-bits integers in the TP code, and 32-bit in the Delphi code)
Here's what I'm trying to write: A friend has asked me for a utility
that will take a size parameter (like "700MB") and copy random files
from a source directory (including recursing to subdirectories) to a
target directory. This is so he can randomly fill things like his
music player or his digital picture frame with new content every day.
My idea was to write it in TP, since it's very quick for me to write a
small utility like this in TP, but then I thought of the following:
- Long filenames (hence the original question). He claims he doesn't
care if the filenames are preserved, since he won't be seeing the
filenames, just the files' data... but it still irks me that the
utility won't preserve the filenames if I write it pure 16-bit DOS.
- Memory. Using my own MP3 collection as a testbed, I have over 9700
music files. Assuming an average directory depth+name of 64 bytes,
building a list of the available files to copy would exceed the 640K
RAM available. So a Win32 compiler is an option simply so I have more/
virtual memory available.
Knowing this, what compiler/environment would you all recommend? I
won't be using OOP for this (there's no point), nor anything
graphical, etc. I'm just a 20-year turbo-pascal coder trying to write
a command-line utility that has to work in Windows XP/Vista.


|