Wednesday, December 28, 2016

Windows Command Line

Windows Command Line


I learned a couple of  new Windows command line tools today: ASSOC and FTYPE.

ASSOC will list all the file associations if given no arguments.
If provides a file extension like ".py", then it will give you the file type for that association:

C:>ASSOC .py
.py=Python.File

FTYPE will get or set the command to execute for a specific file type. For example:

C:>ftype Python.File
Python.File="C:WINDOWSpy.exe" "%1" %*

For me, this was associating with a Python 2.7 interpreter, instead of the Python 3.4 one I wanted. To fix my problem, I executed:

C:Python34myscripts>ftype Python.File

Python.File="C:Python34python.exe" "%1" %*


Available link for download