<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Powershell - MoveFile in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/powershell-movefile/m-p/9212179#M4439</link>
    <description>&lt;P&gt;I was using the powershell script to move all files from normal folders into new folders set as library folders. I tested this on a few folders where the file count was low and it worked perfectly. When I tried it on the folders with a few hundred files in each folder, it removed the old files but never copied to the new folder.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Thankfully I tried this on our sandbox Vault first)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why would this not work? Why did it totally delete the files? Using the &lt;FONT color="#ff6600"&gt;coolOrange&lt;/FONT&gt; PowerVault.&lt;/P&gt;&lt;PRE&gt;Initialize-VDF


Open-VaultConnection -Vault "{Database}" -Server {Server} -User Administrator -Password "{Password}"
$fNewLibraryParent = $vault.DocumentService.GetFolderByPath("$/_Libraries/Content Center/en-US")
$foldLibraryParent = $vault.DocumentService.GetFolderByPath("$/Libraries/Content Center/en-US")


$folders = $vault.DocumentService.GetFoldersByParentId($foldLibraryParent.Id, 0)



$folders | ForEach-Object{
    $_.FullName


    $files = Get-VaultFiles -Folder $_.FullName
    $files | ForEach-Object {
    $vault.DocumentService.MoveFile($_.MasterId,$fOldLibraryParent.Id,$fNewLibraryParent.Id)
    $_.Name
    }


}&lt;/PRE&gt;</description>
    <pubDate>Thu, 19 Dec 2019 14:40:50 GMT</pubDate>
    <dc:creator>ThomasRambach</dc:creator>
    <dc:date>2019-12-19T14:40:50Z</dc:date>
    <item>
      <title>Powershell - MoveFile</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/powershell-movefile/m-p/9212179#M4439</link>
      <description>&lt;P&gt;I was using the powershell script to move all files from normal folders into new folders set as library folders. I tested this on a few folders where the file count was low and it worked perfectly. When I tried it on the folders with a few hundred files in each folder, it removed the old files but never copied to the new folder.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Thankfully I tried this on our sandbox Vault first)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why would this not work? Why did it totally delete the files? Using the &lt;FONT color="#ff6600"&gt;coolOrange&lt;/FONT&gt; PowerVault.&lt;/P&gt;&lt;PRE&gt;Initialize-VDF


Open-VaultConnection -Vault "{Database}" -Server {Server} -User Administrator -Password "{Password}"
$fNewLibraryParent = $vault.DocumentService.GetFolderByPath("$/_Libraries/Content Center/en-US")
$foldLibraryParent = $vault.DocumentService.GetFolderByPath("$/Libraries/Content Center/en-US")


$folders = $vault.DocumentService.GetFoldersByParentId($foldLibraryParent.Id, 0)



$folders | ForEach-Object{
    $_.FullName


    $files = Get-VaultFiles -Folder $_.FullName
    $files | ForEach-Object {
    $vault.DocumentService.MoveFile($_.MasterId,$fOldLibraryParent.Id,$fNewLibraryParent.Id)
    $_.Name
    }


}&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Dec 2019 14:40:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/powershell-movefile/m-p/9212179#M4439</guid>
      <dc:creator>ThomasRambach</dc:creator>
      <dc:date>2019-12-19T14:40:50Z</dc:date>
    </item>
  </channel>
</rss>

