LoginSignup
2

More than 5 years have passed since last update.

一時ファイルを作成するときに乱数でファイル名を決定する

Posted at

これだ。

乱数でファイル名をなんとかする.bat
echo %temp%\%RANDOM%.xml
★出力結果★
C:\Users\UsernameGoesHere\AppData\Local\Temp\30685.xml

ポイント:
%RANDOM% - 0 から 32767 の間の任意の 10 進数に展開します。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2