Re: Current Directory
Derek,
Why not just chop apart any drive/dir info from the file names & then
compare just the file names? You could make a two part sequence, first part
has drive/dir portion, second part has naked filename; then start comparing
just the filenames. If no dupl filename found, re-combine it into one full
path/filename, then compare next. If dupl found, stop comparing it,
re-combine its parts, go on to check next. Each time you re-combine, put it
in another list to actually use.
Dan Moyer
Derek wrote:
> The user is supplying file names in a text file - not interactively. Thus
I
> have NO ability to use interactive dialogs to allow the user to select
which
> files they are referring to. All file names that I get are via a
> gets(<filehandle>) call.
> However, at the time I read in a file name, I need to be able to find that
> file on the system - but only once. So if duplicate file names had been
> supplied, I only need to use the first one.
>
> So my problem is this - how can I detect that duplicate file names have
been
> supplied?
>
> My current way of thinking is that if I convert all file names to their
> complete (canonical, full) form, that of <DRIVE>:<PATH><FILENAME> it would
> then be a simple matter of comparing strings.
>
|
Not Categorized, Please Help
|
|