comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Checking the existence of a file with only part of the file's name
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Checking the existence of a file with only part of the file's name [message #94598] Wed, 19 July 2017 09:07 Go to previous message
thtran296 is currently offline  thtran296
Messages: 8
Registered: June 2017
Junior Member
Hello everybody,

So I have thousands of text files, with the names like "textABC05_023.tab"
I want to check if one of these files exists. So I use the following:

result = file_test('Documents/DataFile/textABC05_023.tab') & print, result

The problem is, this only works if I know the exact full name of the file. What if I only want to check the existence of files, given that I know only part of the name, like "textABC05" (omitting the "_023" part)?

Part of the reasons I want to do that is these files have really random numbers at the end, and all I care is whether their names match up to the part textABC05, and if they did, then they exist.

Thank you for all your assistance.
[Message index]
 
Read Message
Read Message
Previous Topic: Problem (+solution) with make_rt
Next Topic: move window object programmatically

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:32:27 PDT 2025

Total time taken to generate the page: 0.00468 seconds