Re: system() and copy in DOS

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hello all,

Rob wrote:

> Travis Beaty wrote:
>> In Linux, this works fine.  However, in Windows XP I'm having a bit of a
>> problem because the filename being copied is truncated to eight
>> characters.  Apparently it is a problem with long filenames, which as I
>> recall Euphoria has had some issues with in the past.  I don't think
>> that it is Euphoria though, because of the fact that Euphoria isn't
>> actually doing the copying, it is simply calling the DOS copy command
>> via a call to system().
>
> When you run the system() command in ex.exe,
> XP runs an old version of DOS that
> only supports 8.3 filenames.


In that situation, *long* filenames can be processed by using my library
"Lfn.zip" from the user contributions page.
Instead of
   system("del "  & bkname, 2)
   system("copy " & name & " " & bkname, 2)

one has then to write
   system("del "  & short_name(bkname), 2)
   system("copy " & short_name(name) & " " & short_name(bkname), 2)


> If you run system() using exw.exe
> (or exwc.exe - see euphoria\bin\makecon.exw)
> you'll get full support for long filenames.


Best regards,
   Juergen

-- 
The difference between men and boys
is the price of the toys.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu