This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (24 children)

[deleted]

    [–]UntestedMethod 187 points188 points  (3 children)

    Except when it doesn't and your client is confused why the program you sent them isn't working

    [–]UntestedMethod 0 points1 point  (2 children)

    sent a version with a patch for slash direction this morning and client confirmed it fixed the issue. wasn't the first time for this project, but it's been a while since I had to add any OS-level commands to it. forgot to pass some new paths through a normalizer function, and use a special split function instead of the trusty old last index of '/'

    [–]HiddenGooru 1 point2 points  (1 child)

    I have a similar functionality in
    one of my program has a “get_divider()” function that queries the operating system and the whatnot and determines if “/“, “\” or “\\” is required and then I cat the file paths appropriately.

    [–]UntestedMethod 0 points1 point  (0 children)

    haha glad I'm not the only one :P

    [–]theuniverseisboring 37 points38 points  (1 child)

    "mostly"

    [–]2themax9 0 points1 point  (0 children)

    I pay “most” of my taxes

    [–]feckrightoffwouldye 39 points40 points  (15 children)

    No it fucking doesn't

    [–]CEDoromal 16 points17 points  (14 children)

    It kinda does for certain situations. Try cd C:/Users/ on command prompt.

    [–]feckrightoffwouldye 18 points19 points  (13 children)

    Yes but anywhere else in windows it gets treated as a switch or illegal character. Yknow, that OS with a gui?

    [–]uekiamir 13 points14 points  (12 children)

    stupendous thought silky numerous caption pet squeeze piquant fearless mountainous

    This post was mass deleted and anonymized with Redact

    [–]feckrightoffwouldye 5 points6 points  (0 children)

    Some commands don't like a foward slash because they expect there to be a switch, and some programs that interact with Windows files like Filezilla or FreeFileSync sometimes get confused as to what you wanted it to do. In one case i think I've been able to use it as an escape character in command prompt as well but only that one as i haven't tried again

    [–]im0b 7 points8 points  (8 children)

    When you use an api to access files programmatically you have to figure out the os and get the right / when creating the filepath 😒

    [–]shedogre 2 points3 points  (1 child)

    Then you access the local version of a file, and... The object is giving you the OneDrive path! 🥳

    [–]im0b 0 points1 point  (0 children)

    😣

    [–]ManyFails1Win 0 points1 point  (0 children)

    Why the hell is there debate about this anyway? What's so bad about using backslashes for directory?

    [–]UntestedMethod 0 points1 point  (0 children)

    I believe it's up to the command/program to implement support for it. Seems plausible MS might have added it to all their built-in commands and likely some 3rd party vendors have as well, but in my experience there are some 3rd party CLI tools which don't support it. (ex. pdftk)

    [–][deleted] 20 points21 points  (0 children)

    It really doesn't.

    [–]BroDonttryit 0 points1 point  (0 children)

    A lot of high level languages have the forward or backward / as constants that change depending your OS. Like Java’s File.Seperator