Message-ID: <38BD6169.BAFB42CE@teleline.es> Date: Wed, 01 Mar 2000 19:28:57 +0100 From: Mariano Alvarez =?iso-8859-1?Q?Fern=E1ndez?= X-Mailer: Mozilla 4.5 [es] (Win95; I) X-Accept-Language: es MIME-Version: 1.0 To: Eli Zaretskii CC: "djgpp-workers AT delorie DOT com" Subject: Re: short file names when using LFN References: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Reply-To: djgpp-workers AT delorie DOT com Eli Zaretskii escribió: > On Tue, 29 Feb 2000, Mariano Alvarez =?iso-8859-1?Q?Fern=E1ndez?= wrote: > > > Searching the Ralph Brown I found the interrupt to get the short > > file name when using LFN. Here is the routine. Really I d'ont know very > > much about the DJGPP internals, so I made the routine modifying the > > "_gen_short_filename" one. > > _lfn_gen_short_filename is not meant to do this, it has a different > (and very important) functionality. Do NOT replace > _lfn_gen_short_filename with this function, or you will see strange > subtle bugs all over the place! > Sorry, it's my horrible english. I don´t want to replace the _gen_short_filename routine. The routine I have mailed is a new one _lfn_get_short_fname, "get" no "gen". It return the real short file name of a existent file. > > What you seem to want requires a separate function. You can do the > same today with the following snippet: > > putenv ("LFN=n"); > _truename (long_name, short_name); > putenv ("LFN=y"); > No, sorry, this don't work to get the real sfn of a file. > > > Now, I only need the put routine :-) I'm playing with a crazy idea: > > do the copy, compare the short filenames > > if they don't match rename the copied file adding .00n > > do another copy and try again > > when the short filenames match, delete the bad copies. > > I don't understand what are you trying to accomplish. Please > explain. I mailed about this to the general list, I want a copy utility who take care about sfn and lfn of each file. So, you can copy all files to a new drive (by example), make it the master and it work. Greetings, M.Alvarez