Can i use wildcard(*) in assign activity

Variable–> Filepath
Value–> str_Path210+“"+ CurrentRow(“Security name”).ToString * +”*.pdf"
@Anil_G @Kalpesh_Chaudhari @Aakash_Singh_Rawat

HI @pravin_bindage

Why are you using wildcard in the filename

str_Path210+“"+ CurrentRow(“Security name”).ToString +”.pdf"


Hi @pravin_bindage ,

Could you let us know what are you trying to perform ?

The * added to a String is a string itself. The usage of * as a File Search option in Directory.GetFiles would act as a wildcard.

Hi @pravin_bindage,

Could you let me know your requirement?

Because that directory conatains multiple versions of file like

this is the next part of that previous process in which you helped me to remove record from datatable. Now i have to remove those associated pdf files with excel record from directory

And you want to loop through it @pravin_bindage ?

If yes you can use For each file in folder activity or a expression in For Each like

Directory.GetFiles(str_Path210, CurrentRow(“Security name”).ToString+"*"+".pdf")

Okay, you have pdf names in excel records and you want to delete them from local folder?
Do you have the exact full file name in excel cell? Why you want to use * I mea what’s the dynamic there in file name.
You can share a sample record.

Excel dont have exact name. Excal have only name, but there are multiple versions of that name

I have to remove all those blacklisted records from excel & also remove those files associated with that blacklisted record
New Microsoft Excel Worksheet.xlsx (8.6 KB)
Test.txt (7 Bytes)
Test1.txt (14 Bytes)
Test3.txt (11 Bytes)
Test4.txt (16 Bytes)

@Aakash_Singh_Rawat @supermanPunch @Sudharsan_Ka

Sample1.txt (10 Bytes)
Sample1.txt (10 Bytes)
Sample1.txt (10 Bytes)
Sample3.txt (20 Bytes)
Sample4.txt (22 Bytes)

Hi @Aakash_Singh_Rawat i shared all sample data

Hi @pravin_bindage can you try this:

Hi @pravin_bindage ,

Inside your If or Else block where you are getting reocrd to delete from excel use Exist File to check file is exist or not “Test"+CurrentRow(“FileName”).ToString()+”.txt".
If file exists then delete it using Delete File.
You can check for .txt, .pdf. docs differently using switch if you have multiple file formates inside your Test folder.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.