[Solved] How to a copy file with versioning with cmd or PowerShell? [closed]


Simple Google search for “copy replace gui powershell” presented this as second option

Found at http://blog.backslasher.net/copying-files-in-powershell-using-windows-explorer-ui.html

function Copy-ItemUsingExplorer{
    param(
        [string]$source,
        [string]$destination,
        [int]$CopyFlags
    )

    $objShell = New-Object -ComObject 'Shell.Application'    
    $objFolder = $objShell.NameSpace((gi $destination).FullName)
    $objFolder.CopyHere((gi $source).FullName,$CopyFlags.ToString('{0:x}'))
}


Copy-ItemUsingExplorer -source C:\Users\Default\Desktop\End -destination C:\Users\Default\Desktop\Start

6

solved How to a copy file with versioning with cmd or PowerShell? [closed]