PDA

View Full Version : Why doesn't the file path work?


Intrigued
10-06-2004, 11:16 PM
Have you checked and checked again the file path to a file you are referencing in your project and yet still your project is not seeing the file? Well, below you will find an example of an improperly coded file path and the the correct way.

Here is the wrong syntax with regards to the file path between the double quotes:

strData = TextFile.ReadToString("C:\text.txt"); -- Wrong!

Paragraph.SetText("Paragraph1", strData);

Here is the correct syntax with regards to the file path between the double quotes:

strData = TextFile.ReadToString("C:\\text.txt"); -- Correct!

Paragraph.SetText("Paragraph1", strData);

Note: the double back slashes in the path. The first back slash escapes the second back slash. In another words, with out the first back slash AutoPlay Media Studio 5 would not see the other back slash and thus the file path would be incorrectly referenced.

Corey
10-06-2004, 11:55 PM
Nice one! :yes

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)