How to Run BTFS from Anywhere in Command Prompt or PowerShell

By default, you need open Command Prompt or PowerShell then navigate to the folder of btfs.exe application to run the BTFS Daemon.

Wouldn’t it be cool, if we were able to launch BTFS that was saved in a particular folder in say C:BTFS drive be runnable even outside that folder or anywhere you want by typing just the exe name and not including the entire path referencing to it.

And anywhere means, you can launch your application

  • From Start menu (shortcut – Windows key).
  • From Run command dialog box (shortcut – Windows + r).
  • By typing application name in Windows Address bar of any drive/ folder on your computer.
  • By typing application name from a command prompt opened from any drive/ folder directly without worrying to change the directory.
How to Run BTFS from Anywhere in Command Prompt or PowerShell

If you run the daemon from outside of the folder, you would get the following error:

PS C:\Windows\system32> btfs daemon
btfs : The term 'btfs' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ btfs daemon
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (btfs:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

To run the node from anywhere with simple command, you need to add the folder into Windows Environment Variables.

1. Type env in the search bar then open Edit the system environment variables.

How to Run BTFS from Anywhere in Command Prompt or PowerShell

2. In the System Properties window, select Environment Variables… button.

How to Run BTFS from Anywhere in Command Prompt or PowerShell

3. In the Environment Variables window, under System variables select Path then click Edit button.

How to Run BTFS from Anywhere in Command Prompt or PowerShell

4. Now, click New then enter the folder of your application. In this case, we add C:btfs. Click Ok twice to save the changes.

How to Run BTFS from Anywhere in Command Prompt or PowerShell

As you can see, now we can run the app from another folder such as C:WindowsSystem32 instead of the app’s folder C:btfs.

How to Run BTFS from Anywhere in Command Prompt or PowerShell

Leave a Comment

Required fields are marked *