Are you sure it will delete file.log ?
It shouldn't, there is no point after the filename...
Anyway, you may want to use generic character '?' that can replace ONE
character...
.... and try "file.log.?"...
Regards,
Arno
"Viviana Vc" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
> Thanks for the answer. I have tried using SHFileOperation and it works,
> but I still have a problem.
>
> I want to delete the files named: file.log.1, file.log.2, ...,
> file.log.x, _but_ not to delete: file.log
>
> If I use "file.log.*" in pFrom, also the file.log will be deleted. How
> can I avoid this?
>
> Thx in advance,
> Viv
>
> On Wed, 12 May 2004 17:59:22 +0200, "El Cascador !!!"
> <(E-Mail Removed)> wrote :
>
> >Hello,
> >
> >You can either use "SHFileOperation" with FO_DELETE flag set in the
> >SHFILEOPSTRUCT structure or browse the directory deleting files that
match
> >your expression using "PathMatchSpec" function.
> >
> >Regards,
> >Arno
> >
> >"Viviana Vc" <(E-Mail Removed)> a écrit dans le message de
> >news:(E-Mail Removed)...
> >> Hi all,
> >>
> >> I would like to delete from a directory all the files that match:
bar*.*
> >> I know that I could do for instance: system("del bar*.*"), but this
will
> >> bring up the command prompt window and as my app is a winmain app this
> >> wouldn't be nice. I could use DeleteFile, but you can not use wildcards
> >> in this one.
> >>
> >> How could I do this using Windows functions?
> >>
> >> Thanks in advance,
> >> Viv
> >
>
|