Use forward slash in file path on explorer

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 2,435
    Windows 11 Pro 64-bit v23H2
       #11

    Malneb said:
    ok hotshot so explain to me why the commands work then genius? in one sentence.
    You were lucky and depended upon how the interpreter was designed to parse the input.

    If you think that / and \ are interchangeable then open the Command Prompt and type some basic commands demonstrating this. You can post some screen shots of the results.

    Like I implied you apparently have no computer science education or job experience. Where did you get your great wisdom? I have a MS in Computer Science and worked in programming and engineering jobs for over 30 years.
      My Computers


  2. Posts : 1,691
    Windows 10
       #12

    yeah exactly my point the interpreter reads THisTExt tha same as it reads thistext and tHis Text and the same as / and \

    it can be context dependent depending on what you are doing.

    So what is your counter argument trying to prove exactly? because atm it has no grounds anywhere Mr science major, you still never explained why the commands work like that either.

    where tf did you get your wisdom from? a cereal box? I also worked in AV and multimedia and various IT fields you don't have to come in here and start this fkn petty argument kid shit ether. I don't have time for this.

    Various part of the OS are POSIX compliant. Not really sure what your point is tbh and you should know this with your cereal box certificate.
      My Computer


  3. Posts : 2,435
    Windows 11 Pro 64-bit v23H2
       #13

    Malneb said:
    yeah exactly my point the interpreter reads THisTExt tha same as it reads thistext and tHis Text and the same as / and \

    So what is you counter argument trying to prove exactly? because atm it has no grounds anywhere Mr scince major

    where tf did you get your wisdom from? a cereal box? I also worked in AV and multimedia and various IT fields you don't have to come in here and start this fkn petty argument kid shit ether. I don't have time for this.
    I don't understand where you are coming from. Good grief! You are the one that stated that / and \ were interchangeable. Since you are the only one that believes that then convince me that is true. Just come up with one reputable reference. Just one. If you do then I will apologize and will have learned something new.

    Listen! I only posted in this thread because you were posting misinformation. Otherwise, I wouldn't even care.

    I have never said I was perfect. There have been times when I got something wrong. I never attacked whoever called me out. If I still thought I was right I took it upon myself to find proof of what I said. I then presented that proof. If I couldn't I just accepted that and moved on.
      My Computers


  4. Posts : 1,691
    Windows 10
       #14

    run the commands and tell me it works like that, its not misinformation and you tried to step over me when i was only making a simple statement i never came in here to argue a point or disprove anybody but now ironically we are arguing.

    - - - Updated - - -

    Yes for commands you need to use the right case like you are saying, but i never even once said that you didn't even in my initial post i never said that you just decided to hone in on me and say that i was incorrect by the example i gave when i wasn't even saying that.

    Here i show that obviously you need to use a forward slash to denote a command again i never said that this is not the case and in op's context he is talking about path which is what i was also referring to when i came in here. the /d command was irreverent to the point and it was just part of the command i decided to type out.

    Here i show some padding of what its going to except and what it isn't, the point is that OP is talking about Paths so we can use what ever case we want in that context.
      My Computer


  5. Posts : 2,435
    Windows 11 Pro 64-bit v23H2
       #15

    Like I said it is not a good idea to just assume that the interpreter will simply fix syntax errors. It will lead to errors you can't always predict.

    If you use the correct syntax you will always get the expected and correct results. For example, dir C:\

    Use forward slash in file path on explorer-2023-05-06-03_54_58-administrator_-command-prompt.jpg

    However, the command dir C:/ gives a syntax error. To get around this you have to use quotes to force the interpreter to parse the contents. This is not a good programming practice to depend on.

    Use forward slash in file path on explorer-2023-05-06-03_56_10-administrator_-command-prompt.jpg
    Malneb said:
    run the commands and tell me it works like that, its not misinformation and you tried to step over me when i was only making a simple statement i never came in here to argue a point or disprove anybody but now ironically we are arguing.
    I admit that the command cd c:/program files works the same as cd c:\program files. However, it is not proper syntax so is to be avoided. It is best to stick with proper syntax or you could have problems.

    Malneb said:
    yeah exactly my point the interpreter reads THisTExt tha same as it reads thistext and tHis Text and the same as / and \
    Commands in DOS and Windows are not case sensitive. I don't see the point of your statement. However, you shouldn't think you could get away with mixing case in Unix or Linux. They are especially case sensitive for commands, file names and paths. For example in Linux, the command "ls is not the same as "LS", "Ls", or "lS". Using the wrong case gives a syntax error.

    Do you understand what the command "cd c:/program files|Dir" does? You might think that it changes to c:\program files folder and shows the directory for that. All your commands show the same directory of wherever you started. In my case it always showed the directory for C:\ because that is where I started.

    Despite what you might think your command is not the same as
    Code:
    C:\> cd C:\program files
    C:\program files > Dir
    When the command "cd c:/program files|Dir" executes it internally is doing this:
    Code:
    C:\> cd C:\program files
    C:\> Dir
    I learned a long time ago that you can't just string commands together and have them always work as expected. You need to break up commands into separate lines to get predicable results.

    If you want to test this create a batch file with this code. It will output the dir of "C:" not "C:\Program Files"
    Code:
    cd \
    cd c:\program files|Dir > d:\result1.txt
    Use forward slash in file path on explorer-2023-05-06-03_21_43-result1.txt-notepad.jpg

    However, create a batch file with this code. It will output the dir of "C:\Program Files"

    Code:
    cd C:\program files
    dir > d:\result2.txt
    Use forward slash in file path on explorer-2023-05-06-03_21_52-result2.txt-notepad.jpg
    Last edited by MisterEd; 06 May 2023 at 04:12.
      My Computers


  6. Posts : 1,691
    Windows 10
       #16

    and why exactly? if it was a strict rule they would of made it strict syntax so that you cannot break these things. We don't need to argue this heavily over the little nuances.

    We are talking about windows not Linux and yes not case sensitive so you agree with me there. Which is the whole point.

    I have no problem admitting when i am wrong but i am also not entirely wrong either yes the command is wrong after i think about it but the whole premise is again we talking about paths where its entirely fine to use a forward or backslash that is the whole point.

    We done here ths is pointless arguing for no real reason. Not responding to you any further you can talk all you feel like i hold my standpoint and read between the lines some, what i am saying is valid.


    The thread is redundant anyway in its whole premise.
    Last edited by Malneb; 06 May 2023 at 04:38.
      My Computer


  7. Posts : 2,435
    Windows 11 Pro 64-bit v23H2
       #17

    Malneb said:
    and why exactly? if it was a strict rule they would of made it strict syntax so that you cannot break these things. We don't need to argue this heavily over the little nuances.

    I have no problem admitting when i am wrong but i am also not entirely wrong either yes the command is wrong after i think about it but the whole premise is again we talking about paths where its entirely fine to use a forward or backslash..

    We done here ths is pointless arguing for no real reason. Not responding to you any further you can talk all you feel like i hold my standpoint and read between the lines some, what i am saying is valid.

    The thread is redundant anyway in its whole premise.
    Look at the beginning of my last post. I just added an example where it did make a difference.

    You need to understand that it is always better to conform to standards to avoid confusion and error. It might not make a difference for simple examples like you showed but when you have more complex examples skirting the proper syntax can lead to errors.

    These forums are all about learning to solve problems. Naturally there is not always one correct ways to solve them. You are always better off giving advice based upon reasoned and well understood principles. If you are going to deviate from that and say that something works even though it is not technically correct then you need to say that with a caveat. Otherwise, you will mislead people when it wasn't necessary. ... Just some wisdom to think about.
      My Computers


  8. Posts : 1,691
    Windows 10
       #18

    paths forward /\/\/\/\/\/\/\/ back simple that is the whole fkn point of my posts the whole time. Bart Simpsons haircut even made an appearance.

    There is no wisdom to think about we are talking about a path in the command line when it can take / or \ like there is no going over that because that is how it works. It may not be fully intended or best practice but it does work.

    DOS is inspired from Unix and it does hold some of the functionality as carry over. If it does not like what you type it will tell you directly or indirectly by saying nothing or it will produce what it thinks is right.
      My Computer


  9. Posts : 2,435
    Windows 11 Pro 64-bit v23H2
       #19

    Malneb said:
    DOS is inspired from Unix and it does hold some of the functionality as carry over. If it does not like what you type it will tell you directly or indirectly by saying nothing or it will produce what it thinks is right.
    To be nit picky...Actually DOS is not derived from Unix at all. It came from 86-DOS which was developed by Seattle Computer Products. 86-DOS was a 16-bit O/S based upon the Digital Research's 8-bit CP/M O/S. Seattle Computer Products got tired of waiting for Digital Research to develop the 16-bit version of CP/M which was to called CP/M-86. Instead of waiting they developed 86-DOS.

    Digital Research was the company first approached to develop DOS for the IBM PC. Because of missteps by Digital Research that didn't happen. Instead the little company called Microsoft saw an opportunity and jumped on it. Microsoft didn't even have an O/S to sell so they went to Seattle Computer Products and bought 86-DOS from them. Microsoft then sold 86-DOS to IBM. The rest is history.

    Gary Kildall originally developed CP/M during 1974, as an operating system to run on an Intel Intellec-8 development system. It was written in Kildall's own PL/M (Programming Language for Microcomputers). Various aspects of CP/M were influenced by the TOPS-10 operating system of the DECsystem-10 mainframe computer, which Kildall had used as a development environment. Digital Research was formed to develop and sell CP/M.

    Trivia:
    In 1980 IBM approached Digital Research, at Bill Gates' suggestion, to license a forthcoming version of CP/M for its new product, the IBM Personal Computer.

    I well understand the nuances of Unix and Linux. I have used both OSs. I used Linux for 10 years but not right now. Currently I have two Raspberry Pis which run the Raspberry Pi OS. It is based upon Debian Linux.

    Many time I run my Raspberry Pis remotely from my Windows 10 or 11 laptop. Here is a screenshot of one such session with my Raspberry Pi 4B. It shows a Terminal window which is like opening the Command Prompt window in Windows.

    Use forward slash in file path on explorer-ps0707.jpg
      My Computers


  10. Posts : 1,691
    Windows 10
       #20

    CP/M and tops-10 then seeing as you want to get nuanced sure. We can still use / and \ so how about that?

    I guess i was generalizing when i said UNIX as i always just remember that one being one of the earlier CLI and without having to look at dates.

    I know CP/M is the predecessor to Q/86/DOS now that you mention it but i don't use these everyday even at all i would be lying if i said i did so these are not in the forefront of thoughts tbh.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:21.
Find Us




Windows 10 Forums