![]() |
Filepath Backslash(\) or Forwardslash(/) - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: Models and Parts (https://forums.ldraw.org/forum-18.html) +--- Forum: Parts Authoring (https://forums.ldraw.org/forum-19.html) +--- Thread: Filepath Backslash(\) or Forwardslash(/) (/thread-29009.html) |
Filepath Backslash(\) or Forwardslash(/) - Hageta - 2025-08-18 All the documentation I found used backslashes(\) for filepaths e.g "s\subpart.dat". But I could not find if forward slashes(/) are also allowed. LDView can use either without any errors, while LDPe does show an error. If either both or only backslashes are allowed it should be mentioned in the Documentation either under filename or a new section. I do ask this because in ConvertToLDraw I currently use forward slashes and I got this Bug report. I will change the filepaths if they are out of spec. RE: Filepath Backslash(\) or Forwardslash(/) - Hageta - 2025-08-18 Bricklink Studio also supports both b.t.w. RE: Filepath Backslash(\) or Forwardslash(/) - Travis Cobbs - 2025-08-18 (2025-08-18, 16:08)Hageta Wrote: Bricklink Studio also supports both b.t.w. It's a little known fact that Windows supports / as a path separator in most places. So programs have to add extra code to not accept / in place of \. (The Windows command line is one place where / gets special treatment, making it not usually work as a path separator.) All official parts are required to use \ as their path separator (for s\ and 8\ and 48\). But programs have to add extra code to disallow /, and it seems like I didn't do that in LDView. (It's been over two decades since that code was written, so I honestly don't remember the details.) RE: Filepath Backslash(\) or Forwardslash(/) - Peter Blomberg - 2025-08-19 Backslash is required. Forwardslash is not allowed. It may or may not be clear from the documentation, but you will get an error if uploading to the parts tracker. RE: Filepath Backslash(\) or Forwardslash(/) - Orion Pobursky - 2025-08-19 Just a clarification to the comments here: Per the file format spec, either is allowed (i.e. any valid, relative path for your OS). Per the LDraw Library standard (i.e. Official Library parts), only backslash is allowed RE: Filepath Backslash(\) or Forwardslash(/) - Hageta - 2025-08-19 I did change it to backslash in case somebody wants to create official parts. But I still can not find this in the documentation. RE: Filepath Backslash(\) or Forwardslash(/) - Orion Pobursky - 2025-08-19 You're right. While heavily implied via the examples, it is never explicitly stated. In another thread I mention I've been working on a documentation overhaul. I checked and I have explicitly stated in my draft so it will be addressed when the new doc format is released. |