Community
Home
About the Community
JMP Academic
JMP Software Administrators
Regional JMP Users Groups
JMP Discovery Summit Series
Mastering JMP Community
Discussions
File Exchange
Add-Ins
Scripts
Sample Data
JSL Cookbook
JMP Wish List
JMP Blogs
Sign In
All community
This category
This board
Knowledge base
Users
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
JMP User Community
:
Discussions
:
How to open files with a certain file name only?
Topic Options
Subscribe to RSS Feed
Mark Topic as New
Mark Topic as Read
Float this Topic for Current User
Bookmark
Subscribe
Printer Friendly Page
All forum topics
Previous
Next
Choose Language
Hide Translation Bar
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Get Direct Link
Print
Email to a Friend
Report Inappropriate Content
How to open files with a certain file name only?
Mar 4, 2010 1:33 PM
(2682 views)
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.
0
Kudos
4 REPLIES
4
mpb
Super User
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Get Direct Link
Print
Email to a Friend
Report Inappropriate Content
Re: How to open files with a certain file name only?
Mar 4, 2010 2:15 PM
(2589 views)
| Posted in reply to
message from 03-04-2010
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.
0
Kudos
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Get Direct Link
Print
Email to a Friend
Report Inappropriate Content
Re: How to open files with a certain file name only?
Mar 4, 2010 3:32 PM
(2589 views)
| Posted in reply to
message from mpb 03-04-2010
Is there a * wildcard that I can use? I am used to grep in unix. I am trying something as follows:
0
Kudos
mpb
Super User
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Get Direct Link
Print
Email to a Friend
Report Inappropriate Content
Re: How to open files with a certain file name only?
Mar 4, 2010 6:43 PM
(2589 views)
| Posted in reply to
message from 03-04-2010
Try this:
= 1, i--,
If( !Starts With( files1[i], "test" ),
Remove From( files1, i )
);
);
Show( files1 );
-->
1
Kudo
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Get Direct Link
Print
Email to a Friend
Report Inappropriate Content
Re: How to open files with a certain file name only?
Mar 5, 2010 11:14 AM
(2589 views)
| Posted in reply to
message from mpb 03-04-2010
That worked, Thanks.
0
Kudos