mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 12:47:21 +00:00
trailing slash added
This commit is contained in:
1 parent
dc1afab15f
commit
d6e9cd4b19
1 file changed
+2
-2
@@ -8,13 +8,13 @@ function Main {
|
|||||||
$file_name="$($file.Name)"
|
$file_name="$($file.Name)"
|
||||||
$parent_dir="$($file.Directory.Name)"
|
$parent_dir="$($file.Directory.Name)"
|
||||||
|
|
||||||
$Destination="S:\" + "$parent_dir" + "\import"
|
$Destination="S:\" + "$parent_dir" + "\import\"
|
||||||
|
|
||||||
$size=Format-FileSize(($file).length)
|
$size=Format-FileSize(($file).length)
|
||||||
|
|
||||||
$date=Get-Date -UFormat "[%d/%b/%y %T]"
|
$date=Get-Date -UFormat "[%d/%b/%y %T]"
|
||||||
|
|
||||||
if([System.IO.File]::Exists("$Destination\$file_name")) {
|
if([System.IO.File]::Exists("$Destination$file_name")) {
|
||||||
$log_line="{0} {1} already exists at {2}"-f $date, $file_name, $destination, $size
|
$log_line="{0} {1} already exists at {2}"-f $date, $file_name, $destination, $size
|
||||||
Write-Host $log_line
|
Write-Host $log_line
|
||||||
$log_line | out-file $log_file -Append
|
$log_line | out-file $log_file -Append
|
||||||
|
|||||||
Reference in new issue
Block a user