Bin folder for Windows 10

Samuel Ivarsson

I'm trying to replicate a UNIX bin folder on my Windows 10 PC. I have created a folder located at "C:\bin" and added it to my PATH variable. However, I'm not really sure as how to implement it any further than this. I've tried adding shortcuts (lnk-files) to the folder but I can't get that to work.

My goal is to be able to write "python37" in the command prompt to run "C:\Users\Samuel\AppData\Local\Programs\Python\Python37\python.exe" and write "python38" to run "C:\Users\Samuel\AppData\Local\Programs\Python\Python38-32\python.exe".

Simply adding both directories to the PATH variable wouldn't work since both of the executables have the same name, or am I wrong?

squillman

You should be able to create shortcuts and run them like in your original attempt. What's not working? But yes, you would have to name the shortcuts something unique in your bin folder. You would need to include the .lnk extension when executing.

So, in your C:\bin folder and with it in your path create a shortcut to the Python32 exe, name it python37 and execute it by:

C:\somedir> python37.lnk

Alternatively, you could create a .bat file and run it. For Python37 you could create C:\bin\python37.bat with this as the contents:

"C:\Users\Samuel\AppData\Local\Programs\Python\Python37\python.exe" %*

That should let you exclude the extension if you just want a clean python37 command.

C:\somedir> python37

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Windows 10 folder organizer

From Dev

mingwm10.dll missing in the bin folder

From Dev

setting external library /bin folder in cmake in windows

From Dev

Save folder sorting just for that folder in Windows 10

From Dev

New Folder button in Windows 10?

From Dev

Windows 10 Folder Search Sucks

From Dev

Strange folder behaviour in Windows 10

From Dev

How to clean Windows\Installer folder in Windows 10?

From Dev

Recycling bin access denied on windows 10

From Dev

Q: Windows 10 Recycle Bin icon "glitch"?

From Dev

Is "/bin/[.exe" a legitimate file? [Cygwin, Windows 10]

From Dev

Windows 10 Environmental Variable for Documents folder

From Dev

Where is my themes folder on windows 10?

From Dev

How to add tags to a folder in windows 10

From Dev

Cannot delete corrupted folder in windows 10

From Dev

Cannot delete folder with space in name in windows 10

From Dev

Name of user profile folder on Windows 10

From Dev

Change the folder of recording in Windows 10 Xbox app

From Dev

How to change the capitalization of the user folder in Windows 10?

From Dev

Windows 10 not loading folder items/context menu

From Dev

Windows 10 Quick access jumping to another folder

From Dev

How to rename the User folder in Windows 10?

From Dev

Bash File/Folder Permission Issue on Windows 10

From Dev

Windows 10 folder in This PC not being recognized as special

From Dev

Removing profile folder access credentials in Windows 10

From Dev

How to update a copy/backup of a folder in Windows 10?

From Dev

Change user folder name in windows 10

From Dev

Create a New Public Folder in Windows 10 install

From Dev

Where is Docker Windows 10 pull folder

Related Related

HotTag

Archive