TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: John Gardeniers
from: Frank Adam
date: 1996-03-20 06:15:08
subject: Re: File name expansion

G'Day John,
 
-=> Quoting John Gardeniers to Frank Adam <=-
 
 FA> I could ask, why in god's name you don't use system(copy
 FA> ),  but i won't:)
 JG> The answer is that my compiler has nothing like it, although I
Fair enough, lucky i didn't ask :)

 JG> acceptable to PCC.  What I now have is a routine which fully expands
 JG> the source filename but won't (yet) do the same for the destination
 JG> filename. The problem here is with wildcards in the destination.  At
 JG> least I now have a good start and will get back to it as soon as I've
Is it a good idea to allow wildcards in the destination ?
I mean as a simple copy function, especially with the use of '/y' could be 
disastrous.

Suppose a similar sort of algorhythm as my code could be used to build a 
filename, and then both the source and destination paths sent to another 
routine to make the necessary changes to the destination.
Eg: break up the destination string into drv,path,name,ext 
    if(!drv) set default drive or drive defined in sourcepath
    if(!path) same as above 
    if(name contains '*') this will need some thinking
    if(name = '*') set name = sourcename
    if(name contains '?') again this won't be too easy
    same goes for the extension.


I may just play with this, and let you know:)
Does PCC support fnsplit ? It would make your life a bit easier.
                         

  L8r Frank (fadam{at}ozemail.com.au).
                           

--- Maximus 3.01
* Origin: The Software Parlour (3:635/544)
SEEN-BY: 50/99 78/0 620/243 623/630 632/349 635/503 544 727 711/401 409 410
SEEN-BY: 711/413 430 510 808 809 932 934 712/515 713/888 714/906 800/1
SEEN-BY: 7877/2809
@PATH: 635/544 50/99 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.