Groups > Microsoft > Microsoft XAL > Re: Searching OS-files using wildcards




Searching OS-files using wildcards

Searching OS-files using wildcards
Wed, 28 Nov 2007 16:18:04 +010
Hi,

I want to make some DMS-automation and I'm looking for two functions, wich
exist in most  programming languages.
They should give me the first and following files, wich are matching to a
search-string (like"C:\Temp\*.*")

I've found in MAC SYSTEM_INFORMATION this:
// Find first/Find Next
#LOCALMACRO.OsFileSrch    SysInfo(5004,%1)             #ENDMACRO

Okay, thats the function to find the first file and it's running well. But,
how can I get the following filenames?
May be, I'm a little bit blind (today?). Please help!

Thanks in advance!
Detlev

Post Reply
Re: Searching OS-files using wildcards
Wed, 28 Nov 2007 22:49:32 +010
Hello Detlev,

The following is taken from the Microsoft XAL 3.7.0.199 kernel newsletter:

Input to #OsFileSrch, #OsFileSrchDir and #OsFileSrchAll must be file 
descriptors e.g. dirrectoryname\*.*.
#OsFileSrch is used for find first/find next
#OsFileSrchDir is used for find first incl. DIR
#OsFileSrchAll is used for find first incl. ALL

Hope this helps.

-- 
Best Regards
Henrik Hansen [MSFT]
Tecnical Program Manager Microsoft Dynamics C5 & Microsoft XAL
=====================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.


"Detlev Schallehn" <DS@DSchallehn.de> wrote in message 
news:%23Ob2KAdMIHA.5904@TK2MSFTNGP02.phx.gbl...
> Hi,
>
> I want to make some DMS-automation and I'm looking for two functions, wich
> exist in most  programming languages.
> They should give me the first and following files, wich are matching to a
> search-string (like"C:\Temp\*.*")
>
> I've found in MAC SYSTEM_INFORMATION this:
> // Find first/Find Next
> #LOCALMACRO.OsFileSrch    SysInfo(5004,%1)             #ENDMACRO
>
> Okay, thats the function to find the first file and it's running well. 
> But,
> how can I get the following filenames?
> May be, I'm a little bit blind (today?). Please help!
>
> Thanks in advance!
> Detlev
>
> 
Post Reply
Re: Searching OS-files using wildcards
Thu, 29 Nov 2007 08:14:31 +010
> // Find first/Find Next
> #LOCALMACRO.OsFileSrch    SysInfo(5004,%1)             #ENDMACRO
>
> Okay, thats the function to find the first file and it's running well. 
> But,
> how can I get the following filenames?
> May be, I'm a little bit blind (today?). Please help!

Just call it with an empty string as %1... That will make it do a Find 
Next...
When you want to abort the search and start a new, just call it with the new 
search string...

Hope it helps...

Regards
    Gert Lynge 

Post Reply
Re: Searching OS-files using wildcards
Thu, 29 Nov 2007 13:06:01 +010
That works fine!

Thank you very much for information!
Detlev

"Gert" <gert@lynge.org> schrieb im Newsbeitrag
news:%238nd3dlMIHA.4912@TK2MSFTNGP06.phx.gbl...
> > // Find first/Find Next
> > #LOCALMACRO.OsFileSrch    SysInfo(5004,%1)             #ENDMACRO
> >
> > Okay, thats the function to find the first file and it's running
well.
> > But,
> > how can I get the following filenames?
> > May be, I'm a little bit blind (today?). Please help!
>
> Just call it with an empty string as %1... That will make it do a Find
> Next...
> When you want to abort the search and start a new, just call it with the
new
> search string...
>
> Hope it helps...
>
> Regards
>     Gert Lynge
>
>

Post Reply
about | contact