All files can be found on the Releases page.
This Windows command line utility helps to convert Fahrenheit temperatures to Celsius and vice versa with a few options.
I like to provide both temperature types in my weather outputs in various environments (espcially from the command line) and this provides an alternate method rather than always using functions.
This is a Windows command line tool for CMD and PowerShell. There are both x86 (32 bit) and x64 (64 bit) versions of the executable.
The programs assumes input is Fahrenheit and the result is returned in Celsius (please forgive me, but I'm American and I had to choose one or the other and I, more often than not, need to find out what the Celsius result is).
To return the result in Fahrenheit you can pass the /f or /fahrenheit switch the program (/c or /celsius is provided for completeness/to override a passed '/f' switch if a change is branched in a script or something).
The converted result is returned as an integer or float (with 2 decimal places) value and if it's a float the you can set the precision (width) of the decimal with the /w or /width parameter (e.g. /w 0 or /width 8).
The converted value only returns a number, but the temperature type ('C' or 'F') can be appended to the result with the /s or /symbol switch.
As with any portable program this can be placed anywhere you like on your machine, but more preferably in a directory that is in your %PATH% environment variable so you can run it without a full path (tempconvert for example). I recommend using a dedicated Bin directory, but of course, it's your choice. If your path isn't already in your %PATH% environment then I suggest adding it[1], but if not then you have provide the full path (C:\Path\To\tempconvert.exe for example) when executing the program.
Get help:
PS> tempconvert /?
Temperature Convert - Convert Fahrenheit to Celsius
and vice versa. Defaults from
Celsius to Fahrenheit.
tempconvert [/? | /h | /help] | [<temperature> &|
[/t | /temperature]] [/c | /celsius]
[/f | /fahrenheit] [/s | /symbol]
[[/w | /width] <decimal width>]
Temperature Integer, float, or double float
temperature value.
/?, /h, /help This help screen.
/t, /temperature Alternate method of providing
the temperature.
/c, /celsius Temperature is assumed
Fahrenheit and returns a Celsius
/f, /fahrenheit Temperature is assumed Celsius
and returns a Fahrenheit value.
/s, /symbol Appends 'F' or 'C' character to
the result.
/w, /width Width of any trailing decimal.
Defaults to 2; range from 0-15.
Convert Fahrenheit to Celsius (assumes input is Fahrenheit):
PS> tempconvert 69
20.56
Convert Fahrenheit to Celsius formatted with a symbol:
PS> tempconvert 69 /symbol
20.56C
Convert Fahrenheit to Celsius formatted with a symbol and a decimal width of 0 (rounded):
PS> tempconvert 69 /s /w 0
21C
This project is written in C++.
This is graded by CodeFactor and is subjective, but helps me to refactor my work.
| Name | Status |
|---|---|
| codefactor.io |
All hashes are retrieved at compile/build time.
| Description | Status |
|---|---|
| Project Release Date | |
| Total downloads for this project | |
| Complete repository size | |
| Commits in last month | |
| Commits in last year |
Adding a path to the Windows %PATH% environment variable @ DuckDuckGo
Logo
Help
Convert F to C with a temp symbol
If you like any of the projects below and care to donate to my PayPal:
Or Buy Me A Coffee if your prefer:
License Excerpt
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.



