1

I've just started learning python on the ATBS course and have been going for almost 2 months. I'm having trouble with the terminal and command prompt on my PC which is running on windows 10

I have a python file called mClip.py and I am trying to pass an argument called 'agree'. I am trying to run this on the terimal.

Scenario 1: If I type:

PS G:\my drive\atbs\6> python mclip.py agree*

then I get an error saying: C:\Users\Cool-san\AppData\Local\Programs\Python\Python312\python.exe: can't open file 'G:\my drive\atbs\6\mclip.py': [Errno 2] No such file or directory

However Scenario 2: if I type the exact same thing buy capitalise some letters then it successfully runs the python file. I.e. if I type:

PS G:\My Drive\ATBS\6> py mclip.py agree

then the terminal executes the file without problems

The funny thing is whether I type scenario 1 or 2 into my laptop (instead of PC), the terminal is able to execute the file without problems. The only difference I can think of between my laptop and PC is that the laptop is running windows 11 and PC is running windows 10.

I thought that the terminal wasn't case sensitive so why does the command work on my PC when I capitalise some of the letters?

Basically if I type the exact same thing into the terminal but capitalise some of the letters the file is able to be executed without any problems. I only have this problem on my PC which is running windows 10 not my laptop which is running windows 11

1 Answer 1

0

SIMILAR EXPERIENCE: I experienced a similar issue not too long ago accessing Java classes via command prompt. In my situation I had issues with this:

javac C:\Users\example user\Projects\School\Java\MyClass.java

Time after time I continued to get errors that the file path was not found, but it ended up working after I capitalized the folder and added spacing like this:

javac "C:\Users\Example User\Projects\School\Java\MyClass.java

SOLUTION: Use the Python launcher itself:

py "G:\my drive\atbs\6\mClip.py" agree

Double check case sensitivity despite it not usually being an issue on windows:

python "G:\My Drive\ATBS\6\mClip.py" agree

Last but not least, enter the directory:

cd "G:\my drive\atbs\6"

and try and execute it from there..

python mClip.py agree

This should work.

Sign up to request clarification or add additional context in comments.

1 Comment

Yeah all of your suggestions work! I was just curious as to why it was being case sensitive, but I guess that remains a mystery!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.