I'm attempting to loop through a specific directory until I find a file containing a certain substring. The file in question is an XML file used for parameter communication between Python and an Autocad C# Plugin.
Here's what I've completed so far.
Create an XML file containing the required parameters in Python.
Save that file as
xrefTester_(currentDateTime).xml
inC:\Temp\
Here's what I still need to complete:
Use an infinite loop in C# to find the created XML file.
Once the file is found add
.bak
to the end of it so my loop knows to pass it over in the future (this is because multiple XML files containing the substringxref_tester
will exist inC:\Temp\
I have the infinite loop set up and I have no problem getting the files in the directory. However I'm having trouble asserting that a file containing xrefTester
and not ending in .bak
exists.