I work with laravel 5 , when i type in windows cmd this command "touch storage\database.sqlite" this error message rise 'touch' is not recognized as an internal or external command, operable program or batch file. any hint to solve it ?
20 Answers
if you are using node.js just use npm to install it on Windows with this command:
npm install touch-cli -g
it will install the command line interface for touch, you can then use it the same as unix...
3 Comments
touch webpack.config.ts, webpack.config.prod.ts - when that's run, only one file is created, called webpack.config.ts, (i.e. with a comma at the end of the name).The command you're trying to run is a unix/linux based command so it won't work in Windows.
All it does is update the modified timestamps of a file.
There's another question on here that gives you an alternative for Windows: https://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch/764716
1 Comment
You can just use echo> in windows cmd
i.epath/file.sqlite
1 Comment
type NUL > path/file.sqlite as mentioned here: stackoverflow.com/a/295214/13189If you are on windows device just install git bash and type the following command
touch test.html.
The above command will generate a zero kilobyte test.html file for you in your specified directory.
It is applicable to any other type of file.
1 Comment

ex: type nul >test.html in windows CMD & another one ways is
echo.>test.html
both are working 100% fine
1 Comment
You can type the same cmd in git bash in the folder where you want your compose file.
1 Comment
I was reading a solution in the GitHub community and it's effective for me.
If you are using VSCode and you would like to do something like Linux you can use git bash and it works the same. You can add git bash into VSCode by the following:
- File -> Preferences -> Setting ( Or Ctrl + , ).
- Now, looking the top right and choose the icon "Open Settings (JSON)".
- Add this to the last of the Setting file:
"terminal.integrated.profiles.windows": {
"Git Bash": {
"path": "C:\\Program Files\\Git\\bin\\bash.exe"
},
},
"terminal.integrated.defaultProfile.windows": "Git Bash"
- Finally reopen the VSCode and open the git bash terminal in your VSCode.
Notice: Make sure you have already installed Git Bash. Good luck!
Comments
I'm using window subsystem for linux. wsl works just fine mixing Windows and Linux commands:
wsl touch test.py
FYI I've found it here.
Comments
If all the solutions above still dont work for you. Try this:
If you already have Git installed, then you also have GIT BASH installed too... To solve this problem navigate to your project directory using the GIT BASH Terminal and try again using touch Procfile. It should work perfectly.
2 Comments
You may be using PowerShell. The team helped me Add-Content.
Link to the page
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/add-content?view=powershell-7.2&viewFallbackFrom=powershell-7.1
Example: Add-Content -Path .\Test.txt //Test.txt - name of file
Comments
This error occurs because PowerShell's execution policy is set to restrict the execution of scripts. You can change the execution policy to allow scripts to run.
To solve this ->
Search for "PowerShell" in the start menu. Right-click on "Windows PowerShell" and select "Run as administrator".
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser or Set-ExecutionPolicy Bypass -Scope CurrentUser
Confirm the change when prompted by typing Y and pressing Enter.
Once you have changed the execution policy, you can run commands like touch, yarn etc in the terminal:
Thanks me later
Comments
run this code in cmd then Finish:)))))))
npm install touch-cli -g

touchis a *nix command, not a Windows one. Here are some solutions: superuser.com/questions/10426/…type nul>example.txt