デスクトップにPowerShellを使用して作成したディレクトリがあり、その中にテキストファイルを作成しようとしています。PowerShellでtouchコマンドで新しいファイルを作成するエラーメッセージ
ディレクトリを新しいディレクトリに変更し、touch textfile.txt
と入力しました。
touch : The term 'touch' 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
+ touch file.txt
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (touch:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException`
は、なぜそれが機能していない:
これは私が取得エラーメッセージですか?私はGit Bashを常に使用する必要がありますか?
msys/etcを使用する場合は、git bashを使うか、binディレクトリでシステム '%PATH%'を "汚染"するようにgit bashを設定する必要があります。 'touch'はWindowsまたはpowershellコマンドではありません。 git bashから 'Write-Error'などを使うことはできません。 –
あなたの答えをありがとう! – Toni