I am following this tutorial for GruntJS and at the 1min 40sec mark the command new-item is used but when I do it on my command propmpt i get the following error
'new-item' is not recognized as an internal or external command, operable program or batch file.
Why is this happening?
new-item is a powershell command and will only work if you're using powershell, like the person is in the video. It is a command for creating a new file or folder: http://technet.microsoft.com/en-us/library/ee176914.aspx
The equivalent in bash would be touch readme.md to create a readme.md file, such as if you're on OSX.
Or if you're using Windows cmd.exe, call>readme.md.
Or just create a file named readme.md with your GUI.
Related
So I am attempting to install some files from Send Grid via Composer usind the CommandLine.
I am following a tutorial with the link here https://www.youtube.com/watch?v=fEobqi3N7zw
The guy in the video has no problem using Composer via the Command Line in the Windows Command Prompt, but when I input the command $ go_www, my PC whines and stamps it's feet, giving me the following line:
'$' is not recognized as an internal or external command,
operable program or batch file.
In a nutshell, why?
System Information:
Windows 10 64x
I have looked at other posts on here, to no avail, I have tried opening the Command Line too as System Administrator, but to avail. I have tried restarting the system, to no avail, I can confirmed I have composer installed into the correct directory, to no avail .
$ in a shell indicates the shell is not owned by a superuser, it is not part of the command. Try running go_www. Also, the video you linked seems to be using a bash shell, whereas you appear to be running a Windows command prompt from the error message you included in your question, which might be a problem too.
In any case, go_www is an alias the video author uses to quickly navigate to the folder of interest. Try manually navigating there using cd.
Context: I'm using powershell to instantiate a batch file to execute the synchronize remote command in WinSCP and pull in fresh data from a remote directory to my local directory. See screenshots below for contents of the WinSCP commands and the batch file contents.
When I try to execute I am able to successfully authenticate but I see 2 errors.
Batch file contents:
winscp.com /script=winscp_commands_ar_history.txt
/log=C:/Users/REDACTED/Desktop/AR_History_Report/winscp_log_ar_history.txt
WinSCP commands:
option batch abort
option confirm off
open sftp://REDACTED:REDACTED#sftp.REDACTED.com
-hostkey="ssh-rsa 2048 cc:ea:2e:03:96:ca:e7:c0:59:74:13:a8:XX:XX:XX:XX"
synchronize remote /export/GroupAccess/REDACTED/Cognos Reporting/CogTest
C:/Users/REDACTED/Desktop/AR_History_Report
exit
Powershell output:
Errors:
Unknown command '-hostkey=ssh-rsa 2048 cc:ea:2e:03:96:ca:e7:c0:59:74:13:a8:XX:XX:XX:XX'.
'/log' is not recognized as an internal or external command,
operable program or batch file.
Question: How do I resolve these 2 errors? I suspect the last one is related to environment variables since it seems powershell didn't recognize the WinSCP log command so I've added WinSCP to my PATH environment variable but I'm still getting the same errors. Can someone please assist? Thank you.
Both your batch file and WinSCP script have line breaks in the middle of commands. Moreover, in the synchronize command you need to wrap the path with spaces to double quotes.
The batch file should be:
winscp.com /script=winscp_commands_ar_history.txt /log=C:/Users/REDACTED/Desktop/AR_History_Report/winscp_log_ar_history.txt
And the script file should be:
option batch abort
option confirm off
open sftp://REDACTED:REDACTED#sftp.REDACTED.com -hostkey="ssh-rsa 2048 cc:ea:2e:03:96:ca:e7:c0:59:74:13:a8:XX:XX:XX:XX"
synchronize remote "/export/GroupAccess/REDACTED/Cognos Reporting/CogTest" C:/Users/REDACTED/Desktop/AR_History_Report
exit
As an aside, as #mklement0 commented, you don't need another powershell process to invoke a batch file from PowerShell - just invoke batch files directly: .\ar_trigger_history.bat
I'm trying to use C-STAT in IAR using only the command line (for Night build).
How can I do that? and how will i get the output (which format).
according to the user manual i'm typing the following command - and getting an error message
" C:\Program Files (x86)\IAR Systems\Em bedded Workbench
7.3_2\arm\cstat>icstat --db a.db --checks commands commands.txt
'icstat' is not recognized as an internal or external command,
operable program or batch file. "
Is there a need to use "icstat" command in a specific path?
Is there a need to install an add-on, or any other program to enable command line commands?
Thanks
Now i found the path should be
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3_2\arm\bin"
I tried to install Posh-Git to use ssh with Powershell.
I followed the instructions here
The file here was not digitally signed so I changed the Execution Policy to install it. I then (for whatever reason) decided not to use this so I removed the file.
Now whenever I start Powershell I get an error similar to the below:
The term 'C:\xxx\xxx\profile.example.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program.
How do I stop this error message from appearing each time I start Powershell?
You need to edit your PowerShell profile and remove that line from there. The easiest way would be (from within your PowerShell):
notepad $profile
or alternatively you can look up your profile with $profile and edit the file there.
Consult this for further reading: https://blogs.technet.microsoft.com/heyscriptingguy/2012/05/21/understanding-the-six-powershell-profiles/
I'm trying to open a site I created in FileZilla using the command line. This is what have in my .bat file:
#echo off
filezilla.exe -c "0/mysitename"
pause
I'm getting the following error. How can I fix it?
'filezilla' is not recognized as an internal or external command,
operable program or batch file.
In order for an executable to be executed by name, the filezilla.exe file needs to be included on the path. This can be accomplished by
set path=%path%;the\directory\where\filezilla\resides
OR, you can use
the\directory\where\filezilla\resides\filezilla.exe -c "0/mysitename"