# Network Path on Iterations

**URL:** <https://community.easymorph.com/t/network-path-on-iterations/808>\
**Category:** General Q&A\
**Created:** [November 5, 2018, 7:34pm UTC](https://community.easymorph.com/t/network-path-on-iterations/808 "2018-11-05T19:34:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lea](https://community.easymorph.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@Lea](https://community.easymorph.com/u/Lea)\
**Post date:** [November 5, 2018, 7:34pm UTC](https://community.easymorph.com/t/network-path-on-iterations/808/1 "2018-11-05T19:34:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![andrew.rybka](https://community.easymorph.com/user_avatar/community.easymorph.com/andrew.rybka/32/13_2.png) [@andrew.rybka](https://community.easymorph.com/u/andrew.rybka)\
**Post date:** [November 5, 2018, 10:25pm UTC](https://community.easymorph.com/t/network-path-on-iterations/808/2 "2018-11-05T22:25:25Z")

</div>

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.

Thanks,  
Andrew

---

<div class="post-metadata">

**Author:** ![Lea](https://community.easymorph.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@Lea](https://community.easymorph.com/u/Lea)\
**Post date:** [November 5, 2018, 10:41pm UTC](https://community.easymorph.com/t/network-path-on-iterations/808/3 "2018-11-05T22:41:28Z")

</div>

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})

---

<div class="post-metadata">

**Author:** ![Lea](https://community.easymorph.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@Lea](https://community.easymorph.com/u/Lea)\
**Post date:** [November 5, 2018, 10:46pm UTC](https://community.easymorph.com/t/network-path-on-iterations/808/4 "2018-11-05T22:46:43Z")

</div>

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:'

---

<div class="post-metadata">

**Author:** ![andrew.rybka](https://community.easymorph.com/user_avatar/community.easymorph.com/andrew.rybka/32/13_2.png) [@andrew.rybka](https://community.easymorph.com/u/andrew.rybka)\
**Post date:** [November 6, 2018, 11:56am UTC](https://community.easymorph.com/t/network-path-on-iterations/808/5 "2018-11-06T11:56:08Z")

</div>

> [@Lea](#):
>
> 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})

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

---

<div class="post-metadata">

**Author:** ![andrew.rybka](https://community.easymorph.com/user_avatar/community.easymorph.com/andrew.rybka/32/13_2.png) [@andrew.rybka](https://community.easymorph.com/u/andrew.rybka)\
**Post date:** [November 6, 2018, 11:58am UTC](https://community.easymorph.com/t/network-path-on-iterations/808/6 "2018-11-06T11:58:13Z")

</div>

> [@Lea](#):
>
> 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:’

So it's an SQL error?

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