- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How to open files with a certain file name only?
Hi Guys,
I am trying to open some files which have a certain name as follows:
files1 = Files In Directory( "C:\log\*.test*" );
However I do not get anything in files1. How can I just search for specific file names and save them in the files1 list?
Thanks.
I am trying to open some files which have a certain name as follows:
files1 = Files In Directory( "C:\log\*.test*" );
However I do not get anything in files1. How can I just search for specific file names and save them in the files1 list?
Thanks.
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to open files with a certain file name only?
One way:
files1 = Files In Directory("C:\log")
Then go through the list and discard any file names that do not match your file mask, leaving a smaller list containing only the kind of file names you want.
files1 = Files In Directory("C:\log")
Then go through the list and discard any file names that do not match your file mask, leaving a smaller list containing only the kind of file names you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to open files with a certain file name only?
Is there a * wildcard that I can use? I am used to grep in unix. I am trying something as follows:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to open files with a certain file name only?
Try this:
= 1, i--,
If( !Starts With( files1[i], "test" ),
Remove From( files1, i )
);
);
Show( files1 );
-->
= 1, i--,
If( !Starts With( files1[i], "test" ),
Remove From( files1, i )
);
);
Show( files1 );
-->
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to open files with a certain file name only?
That worked, Thanks.