I changed that.
and now it shows no error…
let me run the project and see result.
I changed that.
and now it shows no error…
let me run the project and see result.
local panel show that I have 7 files in the object
Its not going into IF statement… its… going out of if statement…
can you please.
debug and get paused before the for each
use immediate panel and type in: varFTPObject
share the output from immediate panel with us
Feel free to share more implementation details from your modelling with us / your xaml
its not going into if statement…
currentFtpObjectFile.Name.Contains(“Test”)
I also tried with currentFtpObjectFile.Name.StartsWith(“Test”)
I also tried with currentFtpObjectFile.Name.StartsWith(“Test*”)
still its not going inside if statement… but my Foreach variable varFTPDirect has all the file information from FTP…
so I should work but it wont working.
maybe you can help us by sharing the requested info
StartsWith has no wildcard feature implemented, so this will not work
ok but other is not working either.
it is up to you to share it or not. Otherwise debug and inspect by your self
We referred:
so StartsWith was used in the suggestion
When issue is about letter case differences we can also do:
currentFtpObjectFile.Name.ToUpper().StartsWith("TEST")
Here is the info from immediate panel
varFTPDirec
List(2) { FtpObjectInfo { Created=[01/01/0001 00:00:00], FullName=“/Test23 02 29-05-2023 12 10 00.txt”, GroupPermissions=None, Modified=[08/29/2023 13:38:00], Name=“Test23 02 29-05-2023 12 10 00.txt”, OthersPermissions=None, OwnerPermissions=None, Size=0, Type=File }, FtpObjectInfo { Created=[01/01/0001 00:00:00], FullName=“/Test 01 29-08-2023.txt”, GroupPermissions=None, Modified=[08/29/2023 14:30:00], Name=“Test 01 29-08-2023.txt”, OthersPermissions=None, OwnerPermissions=None, Size=0, Type=File } }
tried with that too still not going into IF statement…
Just take a break and then continue fresh and recreated.
When it is not entering the for each loop
I think you misunderstood…
My file name consist of File name, number with spaces, Date and time…
Like: Test 23 29-08-2023 09 01 01.txt
Name is: TEST
Number is: 23 and it will change
Date: 29-08-2023
Time: 09 01 01
I want to check the the file name and number and date so that i’m sure that the file im copying 1st time from FTP and downloading it to robot machine… is not going to be downloaded again…
its just a simple checkup I want to do…
I tried with FileExist actitivy but its not taking the wildcard as you said…
So how can I check through if statements that It gives me Files where Name and date is matched for each file?
this is to be sure that i’m not copying an old file from FTP.
We hope you got it so far:
with the new input from you
we can extend StartsWith and/or also setup other match evaluations
thanks it worked…
the answer was (we can extend StartsWith and/or also setup other match evaluations)
so I created 2 statemenets in if … where in one I check the name with Name.Contains and date with same logic.
it workes… thanks
I though i have to write whole path in same condition which is not.
thanks it gave me write result now…
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.