Slash or backslash??

vitamin

I noticed that some mods use slashes in *.gen files while other backslashes.

Example #1:
Code:
SearchPath=<VEHDIR>/Evolution/CUP

Example #2:
Code:
SearchPath=<VEHDIR>\LANCIA_BETA_TURBO

Both mods seem to be working fine (haven't noticed any errors in trace files). So does it mean that both methods are good, and rFactor doesn't care which character is used in SearchPath parameter?
 
Interesting observation. Though from what I can tell, all the stock vehicles use the backslash convention. And it's usually the case that if there are several methods that work, only one of those methods are considered "good." So, are both methods good? I don't think so. Does rFactor care? Apparently not.
 
It's even more interesting in sfx files. Here's one example:

Code:
VS_OUTSIDE_ENGINE_NEUTRAL_1=Evolution\Exterior\sce_ex_idle.wav
VS_OUTSIDE_ENGINE_NEUTRAL_2=Evolution\Exterior\sce_ex_idle.wav
VS_OUTSIDE_ENGINE_NEUTRAL_3=Evolution\Exterior\sce_ex_idle.wav
VS_OUTSIDE_ENGINE_NEUTRAL_4=Evolution\Exterior\sce_ex_idle.wav
VS_OUTSIDE_ENGINE_NEUTRAL_5=Evolution\Exterior\sce_ex_idle.wav

VS_INSIDE_SHIFT_UP_1=Evolution/Interior/shift_up.wav
VS_INSIDE_SHIFT_UP_2=Evolution/Interior/shift_up.wav
VS_INSIDE_SHIFT_UP_3=Evolution/Interior/shift_up.wav
VS_INSIDE_SHIFT_UP_4=Evolution/Interior/shift_up.wav
VS_INSIDE_SHIFT_DOWN_1=Evolution/Interior/shift_down.wav
VS_INSIDE_SHIFT_DOWN_2=Evolution/Interior/shift_down.wav
VS_INSIDE_SHIFT_DOWN_3=Evolution/Interior/shift_down.wav
VS_INSIDE_SHIFT_DOWN_4=Evolution/Interior/shift_down.wav

Even though it seems to work, I think you're right about the backslashs, and rFactor. I checked some files from ISI original cars, and they use only backslashes there.
 
Using Windows-Explorer (not Internet-Explorer) navigate to a car mod in your rFactor Vehicles folder.
Then at the top click on the empty place in the search bar.
You will see that the path shows up as:

C:\Program Files\rFactor\GameData\Vehicles\F1-1967

Windows is using a backward slash which I think is the preferred method.

edited >> sorry I confused the wording backwards slash and forwards slash ........... now edited and corrected. Thanks for pointing out my error.
 
Last edited:
Yes, backslashes is the way to go (even though rFactor seems to accept both slashes).
 
Helpful hint for all that have problems confusing the two: Backslash is under the Backspace key.
 
The C language libraries and Windows OS libraries both accept both the forward and backward slashes in file paths.

In the first examples the predefined macro, <VEHDIR>, has a trailing backslash in it so the SearchPath statement does not need another one. It still works OK but it's unnecessary. It should read, SearchPath=<VEHDIR>LANCIA_BETA_TURBO
 

Back
Top