我的脚本创建了一个文件夹,我在开始时将其定义为变量。
像这样 :
$version = "1.65"
$destpath = "C:\something\someprogramm\$version"
New-Item -ItemType directory -Path "$destPath"
当我现在创建文件夹 1.65 时,我的脚本会用我想复制到那里的所有文件填充这个文件夹。
当我第二次运行脚本时,他将覆盖此文件夹中的内容。
我想防止这种意外覆盖,但是那是怎么做的呢?
我的脚本创建了一个文件夹,我在开始时将其定义为变量。
像这样 :
$version = "1.65"
$destpath = "C:\something\someprogramm\$version"
New-Item -ItemType directory -Path "$destPath"
当我现在创建文件夹 1.65 时,我的脚本会用我想复制到那里的所有文件填充这个文件夹。
当我第二次运行脚本时,他将覆盖此文件夹中的内容。
我想防止这种意外覆盖,但是那是怎么做的呢?