I would like the script check the folder to see if the file existed but the filename has (.) in it, So the normal wildcard *.
does not work, do you have a trick to do that
thanks,
EX
IfFileexists>C:\PAYSTUBS\STUBS\*._j.john.pdf,
MessageModal>found it
else
MessageModal>notfound
select wild card for files with dots
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 26
- Joined: Thu Nov 17, 2016 2:45 pm
Re: select wild card for files with dots
Timle check to make sure you have your file named correctly. I made a little test code for trial and it works fine.
I have a text file on my desktop named "my.test"
and ran the code
and if found it hope this helps
I have a text file on my desktop named "my.test"
and ran the code
Code: Select all
IfFileExists>C:\Users\Me\Desktop\*.test.txt
MessageModal>found it
else
MessageModal>notfound
Endif
Re: select wild card for files with dots
In my example, I have more dot than regular .ext
if I have two files named : document_test.1.pdf and document_test.2.pdf
and I want the script to find the first record , if it finds it it will email to someone
IfFileexists>C:\PAYSTUBS\STUBS\*_.test.1.pdf
MessageModal>found it
else
MessageModal>notfound
if you run this script above, it will say not found
if I have two files named : document_test.1.pdf and document_test.2.pdf
and I want the script to find the first record , if it finds it it will email to someone
IfFileexists>C:\PAYSTUBS\STUBS\*_.test.1.pdf
MessageModal>found it
else
MessageModal>notfound
if you run this script above, it will say not found
-
- Junior Coder
- Posts: 26
- Joined: Thu Nov 17, 2016 2:45 pm
Re: select wild card for files with dots
Sorry for the delay in response
i tried the code you posted and your right it does not like it for some reason. Playing around with it tho, I found that it does not like the " *_ " part .To solve this I just backed it up a bit past the " _ "
And it was able to find a file on my desktop named document_test.1.txt
Note: it also did not like the letter after the " _ " so that is why the " t " in test is missing.
i tried the code you posted and your right it does not like it for some reason. Playing around with it tho, I found that it does not like the " *_ " part .To solve this I just backed it up a bit past the " _ "
Code: Select all
IfFileExists>C:\Users\ME\Desktop\*est.1.txt
MessageModal>found it
else
MessageModal>notfound
Endif
Note: it also did not like the letter after the " _ " so that is why the " t " in test is missing.
Re: select wild card for files with dots
interesting...thank you