Remove row from text file

This is my text file remove row where account code is 113400

Duplicate : Remove line from text file

Can you share the sample text file @Yogita_Gaikwad

sample.txt (302 Bytes)
this is my text file and i want to remove row where account number is 1113434

Hi @Yogita_Gaikwad

Have a look on the XAML file

RemoveParticularText.xaml (5.1 KB)

Output

Sample1.txt (245 Bytes)

Regards
Gokul


which package i need to install for this missing activity for u r workflow

Hi @Yogita_Gaikwad, I hope you are doing well.
For your current problem am attaching the workflow and output file.
RemoveText.xaml (5.2 KB)
Sample1.txt (245 Bytes)

I hope this workflow will help you.

Thanks & Regards,
Shubham Dutta

Install Uipath.System.Activities in manage packages @Yogita_Gaikwad

Regards
Gokul

and for the above workflow,
image
in above assign provide the number which associated row you want to remove instead of 1113434.

Thanks & Regards,
Shubham Dutta


this is my file extract.txt and account number is113400 but this row is not remove from text file

Hey @Yogita_Gaikwad

Have you check the above XAML file . It will c reate an new file with different name


first i read extract.txt text file and store output in Result1 and pass Result1 in Assign

Use Writ text file activity to write the output result in the new text file @Yogita_Gaikwad

can you tell me if i want to provide 2 or 3 Account number in assign activity then what i do like i want to remove row of 113400,124567,22113

Hi @Yogita_Gaikwad,
For this you have to just modify the regex expression.

Please if you can provide us the exact requirement and exact text file we can assist you in better way.

Thanks & Regards,
Shubham Dutta

sample.txt (310 Bytes)


i want to delete two rows from sample text file where Account code is 113401 & secod Account number is 1113434

RemoveText.xaml (5.6 KB)
This will help you.

Your output will be in sample1.txt

and in future if you want to add more numbers just add it like this:|(\S.+113400) to the existing regex expression.

Thanks & Regards,
Shubham Dutta

Hi @Yogita_Gaikwad,
If you got the solution from my workflow please mark my answer as solution and close the thread.

Thanks & Regards,
Shubham Dutta

Hi @Yogita_Gaikwad,
I think I helped you to get your desired solution?You wanted multiple selection right?

Thanks & Regards,
Shubham Dutta

image
can u tell me
This is my two text file one is sample.txt & other is sample1.txt and i want to read sample.txt text file then check Option A if Option A have Account code ex. 113401 then goto sample 1.txt and remove row which has account no 113401
then again check second Option A again it has account no then remove from sample1.txt