<?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 Vault folder structure sync in Vault Forum</title>
    <link>https://forums.autodesk.com/t5/vault-forum/vault-folder-structure-sync/m-p/9084938#M21941</link>
    <description>&lt;P&gt;Short of performing a 'get' from Vault, is there a way to synchronize the complete Vault folder structure to the local working folder?&lt;/P&gt;&lt;P&gt;Long story short, the Vault wasn't set up optimally where I work and I'm trying to remedy that, but in the interim I need an easy way to perform this sync.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Oct 2019 12:23:54 GMT</pubDate>
    <dc:creator>TYoung_Combi</dc:creator>
    <dc:date>2019-10-14T12:23:54Z</dc:date>
    <item>
      <title>Vault folder structure sync</title>
      <link>https://forums.autodesk.com/t5/vault-forum/vault-folder-structure-sync/m-p/9084938#M21941</link>
      <description>&lt;P&gt;Short of performing a 'get' from Vault, is there a way to synchronize the complete Vault folder structure to the local working folder?&lt;/P&gt;&lt;P&gt;Long story short, the Vault wasn't set up optimally where I work and I'm trying to remedy that, but in the interim I need an easy way to perform this sync.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 12:23:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-forum/vault-folder-structure-sync/m-p/9084938#M21941</guid>
      <dc:creator>TYoung_Combi</dc:creator>
      <dc:date>2019-10-14T12:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Vault folder structure sync</title>
      <link>https://forums.autodesk.com/t5/vault-forum/vault-folder-structure-sync/m-p/9085148#M21942</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess you want to get the Vault folder structure without actually doing the Vault 'Get' command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No, what you are looking for looks quite close to the idea in Vault ideastation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/vault-ideas/get-full-vault-folder-structure/idi-p/8684458" target="_blank"&gt;https://forums.autodesk.com/t5/vault-ideas/get-full-vault-folder-structure/idi-p/8684458&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If yes, please vote.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Yogeshwar&lt;/P&gt;
&lt;P&gt;(Vault team)&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 13:46:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-forum/vault-folder-structure-sync/m-p/9085148#M21942</guid>
      <dc:creator>gandhey</dc:creator>
      <dc:date>2019-10-14T13:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Vault folder structure sync</title>
      <link>https://forums.autodesk.com/t5/vault-forum/vault-folder-structure-sync/m-p/9085226#M21943</link>
      <description>&lt;P&gt;Yes, that is what I am looking for.&amp;nbsp; Thank you for the link to the 'ideas' page; I voted it up and added my own comments.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 14:20:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-forum/vault-folder-structure-sync/m-p/9085226#M21943</guid>
      <dc:creator>TYoung_Combi</dc:creator>
      <dc:date>2019-10-14T14:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Vault folder structure sync</title>
      <link>https://forums.autodesk.com/t5/vault-forum/vault-folder-structure-sync/m-p/10090132#M21944</link>
      <description>&lt;P&gt;Hello there, I know this is somewhat old, but i found a need for having the folder tree as well. Since my company uses Inventor predominantly, i wrote an iLogic Rule to do just this and can be run by any user with Inventor+Vault. You or any other users that happen across this will just have to modify the local path to what you use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you don't have/use inventor, then it could be converted to a standalone application, vault extension, powershell script, or other,&amp;nbsp; would have to change the login code at the very least. However, my current knowledge is limited to running it through inventor and I have no need to expand it, so i wont convert it myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;AddReference "Autodesk.DataManagement.Client.Framework.Vault.dll"
AddReference "Autodesk.DataManagement.Client.Framework.dll"
AddReference "Connectivity.Application.VaultBase.dll"

Imports VDF = Autodesk.DataManagement.Client.Framework
Imports VB = Connectivity.Application.VaultBase

'''''''''''''''''''''''''''''''''''''''
''' Author: greg
''''''''''''''''''''''''''''''''''''''' 

''' Syncs entire folder structure of vault to local workspace. Creates folders only, does not get any files

Sub Main()
	'get active vaultconnection
	Dim mVltCon As VDF.Vault.Currency.Connections.Connection = VB.ConnectionManager.Instance.Connection

	'check if user is logged in
	If mVltCon Is Nothing OrElse mVltCon.UserName Is Nothing OrElse mVltCon.UserName = "" Then
		MessageBox.Show("Not Logged In to Vault! - Login first and repeat executing this rule.")
		Exit Sub
	End If

	'get vault root folder
	Dim root As VDF.Vault.Currency.Entities.Folder = mVltCon.FolderManager.RootFolder
	'get full list of folders, using recurse parameter. Downselect to the folder name
	Dim vaultPaths As IEnumerable(Of String) = mVltCon.FolderManager.GetChildFolders(root, True, False).Select(Function(c) c.FullName)
	'modify vault paths into windows local paths
	Dim localPaths As IEnumerable(Of String) = vaultPaths.Select(Function(c) c.Replace("$/", "C:\Workspace\").Replace("/", "\"))

	Dim errs As New ArrayList
	'make directories if not existing
	For Each dr As String In localPaths
		Try
			If Not System.IO.Directory.Exists(dr) Then
				System.IO.Directory.CreateDirectory(dr)
			End If
		Catch
			errs.Add("Could not make folder: " &amp;amp; dr)
		End Try
	Next
	'show errors if any
	If errs.Count &amp;gt; 0 Then MsgBox(String.Join(vbCrLf, errs.ToArray))
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 14:13:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-forum/vault-folder-structure-sync/m-p/10090132#M21944</guid>
      <dc:creator>greggeorgi</dc:creator>
      <dc:date>2021-02-17T14:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Vault folder structure sync</title>
      <link>https://forums.autodesk.com/t5/vault-forum/vault-folder-structure-sync/m-p/11068977#M21945</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3610519"&gt;@greggeorgi&lt;/a&gt;&amp;nbsp; Thanks for your help, works wonderfully. &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 17:48:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-forum/vault-folder-structure-sync/m-p/11068977#M21945</guid>
      <dc:creator>davis.j</dc:creator>
      <dc:date>2022-03-29T17:48:15Z</dc:date>
    </item>
  </channel>
</rss>

