# How do I correctly loadStrings() from a file path on my local computer?

**URL:** https://discourse.processing.org/t/how-do-i-correctly-loadstrings-from-a-file-path-on-my-local-computer/23238
**Category:** Coding Questions
**Created:** [August 13, 2020, 10:15pm UTC](https://discourse.processing.org/t/how-do-i-correctly-loadstrings-from-a-file-path-on-my-local-computer/23238 "2020-08-13T22:15:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![CaseyJ](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/caseyj/32/15118_2.png) [@CaseyJ](https://discourse.processing.org/u/CaseyJ)
#### Post date: [August 13, 2020, 10:15pm UTC](https://discourse.processing.org/t/how-do-i-correctly-loadstrings-from-a-file-path-on-my-local-computer/23238/1 "2020-08-13T22:15:25Z")

</div>

I have been working on reading a text file. Making progress.

However, I have encountered a problem I would like some help on. That being how do I read a text file from a folder on another part of my computer?

I am using Windows 10, so I can grab the file path from the File Explorer. However, because of the type of backslash it will not load. How should I be formatting this so it will work correctly?

Thank you!

Error code:  
**processing.app.SketchException: Not expecting symbol ‘U’, which is LATIN CAPITAL LETTER U.**

> // Code by Casey Scalf  
> // Basic Display of text from .txt file
> 
> PFont f;  
> String lines;  
> String joinLines;
> 
> /////////////////////////////////////////////////////////////////////////////////////////  
> void setup () {
> 
> size(960, 540, P3D);  
> background(0);
> 
> f = createFont(“Arial”, 24, false); // Arial, 16 point, anti-aliasing on  
> textFont(f);
> 
> lines = loadStrings(“C:\Users\Casey Scalf\Desktop\Projects\Amazon Book\Book Export\IMG\_0004.txt”);  
> joinLines = join(lines, “”);
> 
> println(joinLines.length());  
> }
> 
> /////////////////////////////////////////////////////////////////////////////////////////  
> void draw() {
> 
> fill(220);
> 
> textAlign(LEFT);  
> textLeading(40);
> 
> text(joinLines, 50, height/3, width - 100, 200);  
> }

---

<div class="post-metadata">

### Author: ![Hapiel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hapiel/32/10226_2.png) [@Hapiel](https://discourse.processing.org/u/Hapiel)
#### Post date: [August 13, 2020, 10:50pm UTC](https://discourse.processing.org/t/how-do-i-correctly-loadstrings-from-a-file-path-on-my-local-computer/23238/2 "2020-08-13T22:50:24Z")

</div>

The fix for that is really simple: replace the backward slashes with forward slashes!

---

<div class="post-metadata">

### Author: ![CaseyJ](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/caseyj/32/15118_2.png) [@CaseyJ](https://discourse.processing.org/u/CaseyJ)
#### Post date: [August 13, 2020, 10:52pm UTC](https://discourse.processing.org/t/how-do-i-correctly-loadstrings-from-a-file-path-on-my-local-computer/23238/3 "2020-08-13T22:52:53Z")

</div>

That worked great thank you!
