Delete file from network folder

Post Reply
paul_barker
Newbie
Posts: 16
Joined: Thu Dec 08, 2022 2:25 pm

Delete file from network folder

Post by paul_barker »

I am trying to create a flow to delete an older version of a file which was stored in a folder on a network volume. The beginning part of the name is always the same but the ending may be different so I tried to use the inject wildcard app using the name should begin with filter to inject the file from the network folder and then send it to trash. At first it seemed to be working but the problem is our job numbers sometimes have a period in them (ie 12345.45) which causing it to give the error in the screenshot below. Does anyone have any ideas how I can get this to work or is there another way of achieving this. Any help would be greatly appreciated.
Screenshot 2023-07-27 at 08.52.53.png
Screenshot 2023-07-27 at 08.52.53.png (172.96 KiB) Viewed 4446 times
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: Delete file from network folder

Post by freddyp »

Are you sure it is the space that is causing the issue?

What settings did you use? What is the name of the file that triggers the injection and what is the name of the file you want to inject?
paul_barker
Newbie
Posts: 16
Joined: Thu Dec 08, 2022 2:25 pm

Re: Delete file from network folder

Post by paul_barker »

Hi Freddy
It's not a space it's the dot . thats causing it to fail. If the job number doesn't have a dot 12345 then it works but if the job number has a dot 12345.34 then it fails. The input filename is "9399.25 - Text - Doritos - Doritos _ P5 England Scotland Wales 30x40 HR_p2-lr.pdf" and the file to inject is called "9399.25 - Text - Doritos - Doritos _ P5 England Scotland Wales 30x40 HR-lr.pdf" and I am using the beginning of the filename "9399.25 - Text - Doritos -" in the Inject Wildcard app.
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: Delete file from network folder

Post by freddyp »

I suggest to try a couple of other combinations to see if one of them works. Suggestion:

"Injected jobs name filter" - Define regular expression - [Job.NameProper:Segment="1,26"].+
"Name should" - does not matter because it will be ignored.

2nd suggestion:
"Injected jobs name filter" - Single-line text with variables - [Job.NameProper:Segment="1,26"]*
"Name should" - "contain filter"
paul_barker
Newbie
Posts: 16
Joined: Thu Dec 08, 2022 2:25 pm

Re: Delete file from network folder

Post by paul_barker »

I have tried both these and both give me the same error. I have found a different solution though which is to use the scan hierarchy to check if a file exists and use the name from the dataset created in the standard inject tool and this seems to work all the time. Thank you anyway for you help.
Post Reply