Network Path on Iterations

I have a project that loops through files on a network server and passes the data to another project to process them.

These projects were working without any issues, we had power loss and the servers all needed to boot back up again.

The list of files populates, but the iterate actions gives me an error… see below

Now my projects are giving me an error on the File name with full path.

I have tried the map drive and using the unc path both are giving me an error
#Incorrect syntax near ‘S:’. when using the map drive name and
#Incorrect syntax near “\” when using the unc path

Hi Lea,

It seems that Iterate action is set to “Collect errors and continue” mode. Can you please switch it to “Halt project” mode and run Iterate action.

It should give you an error with the same text as you mentioned above, but also it should show you an exact action which issued that error.

Can you please go to that action and check if everything OK with its settings.

If you will not be able to see the source of the error, please send us a screenshot of that action’s settings.


Well I am learning and I did what you stated … it was caused when I tried to rename the file and use that filename in a database command.

So here is the issue. Files that have been revised and need to be rerun have ’ Revised’ in the file name, I created another parameter DeleteFileName by trying to use a calculation to replace ’ Revised’ with a blank, and that is what is causing the issue. Maybe my syntax for the function is not correct, can you take a look for me please.

if(contains({FileName},’ Revised’),replace({FileName},’ Revised’,’’),{FileName})

I also meant to tell you that I have database command to delete from mytable where filename = {DeleteFileName}

This is where I am getting incorrect syntax near ‘S:’

@Lea, your expression contains apostrophes. They should be replaced with single or double quotes. Otherwise this expression looks good to me.

So it’s an SQL error?

Are you using “Database command” action with “Custom SQL” mode or “Delete database rows” action?