Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
サーバー名などの変数に基づいて、場所 A から B にいくつかのファイルとフォルダーをコピーする Windows バッチ スクリプトを作成する方法は?
テキスト エディタ (Windows の組み込みのメモ帳など) を使用して、コマンドラインに入力するコマンドをファイルに保存します。そのファイルを拡張子「.bat」または「.cmd」で保存します。
おそらく使用したいコマンドは「copy」または「xcopy」です。「/?」を付けて呼び出すことで、それらを呼び出す方法について詳しく知ることができます。例:
copy /?
環境変数の詳細については、次を試してください。
set /?