# How to replace a space with %20 in a file iterator?

**URL:** https://www.finalbuilder.com/forums/t/how-to-replace-a-space-with-20-in-a-file-iterator/2285
**Category:** Discussion
**Created:** [July 7, 2014, 9:53am UTC](https://www.finalbuilder.com/forums/t/how-to-replace-a-space-with-20-in-a-file-iterator/2285 "2014-07-07T09:53:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nicklasjepsen](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/nicklasjepsen/32/157_2.png) [@nicklasjepsen](https://www.finalbuilder.com/forums/u/nicklasjepsen)
#### Post date: [July 7, 2014, 9:53am UTC](https://www.finalbuilder.com/forums/t/how-to-replace-a-space-with-20-in-a-file-iterator/2285/1 "2014-07-07T09:53:33Z")

</div>

Hi there,  
  
I’m trying to replace all spaces in a file path from an iterator with %20 so that I can use the iterator to call the subversion delete action.  
However the output I get from the string replace method is:  
String Replace: &nbsp; has been replaced with&nbsp;  
Input string is: C:\Dev\BuildTmp\ProjectName\Compiled\Some library.dll

Search string is set to ’ ’&nbsp;  

(A space)  
Replacement string is set to:&nbsp;%%20%  
  
Any idea why it is not replacing the empty space?  
  
Thanks,

---

<div class="post-metadata">

### Author: ![davestiff](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/f08c70/32.png) [@davestiff](https://www.finalbuilder.com/forums/u/davestiff)
#### Post date: [July 7, 2014, 2:00am UTC](https://www.finalbuilder.com/forums/t/how-to-replace-a-space-with-20-in-a-file-iterator/2285/2 "2014-07-07T02:00:48Z")

</div>

Hi Nicklas,  
  
I was able to get this to work.  
  
**FIND STRING TAB**  
Search String: ’ ’ (a space without the quotes)  
- uncheck all check boxes  
  
**REPLACE TAB**  
Replacement String: %20%  
- choose “Replace Text and Write Back to source file”  
- uncheck all check boxes  
  
Thanks,  
Dave

---

<div class="post-metadata">

### Author: ![nicklasjepsen](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/nicklasjepsen/32/157_2.png) [@nicklasjepsen](https://www.finalbuilder.com/forums/u/nicklasjepsen)
#### Post date: [July 9, 2014, 12:59pm UTC](https://www.finalbuilder.com/forums/t/how-to-replace-a-space-with-20-in-a-file-iterator/2285/3 "2014-07-09T12:59:07Z")

</div>

Using Text Find/Replace instead of String Replace did solve it for me. However I use %20 as the replace string, which works fine.  
  
Thanks!
