Monday, September 30, 2024

File type on Windows

 Begin by checking whether the association is already configured:

C:\MyRuby>assoc .rb
File association not found for extension .rb

Assuming that the association is not already configured, take the following steps to complete the configuration:

C:\MyRuby>assoc .rb=rbFile


Check to see if the file type rbfile already exists:

C:\MyRuby>ftype rbfile
File type 'rbfile' not found or no open command associated with it.

Assuming it does not already exist (be sure to substitute the path to your Ruby installation in the following command):

C:\MyRuby>ftype rbfile="D:\Ruby\bin\ruby.exe" "%1" %*

Verify the setting:

C:\MyRuby>ftype rbfile
rbfile="D:\ruby\bin\ruby.exe" "%1" %*

Add .rb to the PATHEXT environment variable as follows:

C:\MyRuby>set PATHEXT=.rb;%PATHEXT%

Once the above settings are configured simply run the program by typing the filename at the command prompt (the .rb filename extension is not required):

C:\MyRuby> hello
Hello Ruby

The above steps can be placed in your Autoexec.bat file if you would like this association made every time you reboot your system.


https://en.wikipedia.org/wiki/AUTOEXEC.BAT


https://www.techotopia.com/index.php/Ruby_Essentials


https://www.ruby-lang.org/en/documentation/


https://github.com/EbookFoundation/free-programming-books/blob/main/books/free-programming-books-langs.md#ruby


https://www.codeproject.com/Tips/746102/Computer-Talker-with-Csharp

No comments:

Post a Comment

Коментар: