Skip to content

Instantly share code, notes, and snippets.

@ek0
Created March 28, 2020 22:35
Show Gist options
  • Save ek0/2f7d75ae22e84e7eed84fc4f355edc80 to your computer and use it in GitHub Desktop.
Save ek0/2f7d75ae22e84e7eed84fc4f355edc80 to your computer and use it in GitHub Desktop.
param([Parameter(Mandatory=$true)] [String]$File)
# PATH of your RE projects.
$re_path = "D:\RE\"
$temp_filename = Split-Path $File -leaf
if(-not (Test-Path ($re_path + $temp_filename + "\") -PathType Container))
{
# Add subfolder
}
else
{
# Create folder
New-Item -Path ($re_path + $temp_filename + "\") -ItemType Directory -ErrorAction Stop | Out-Null #-Force
}
$new_path = $re_path + $temp_filename + "\" + (Get-ChildItem $File).VersionInfo.FileVersion + "\"
Write-Host $new_path
New-Item $new_path -ItemType Directory
Copy-Item -Path $File -Destination $new_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment