<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>change folder environment in batch</title><link>https://communities.bentley.com/products/projectwise/f/projectwise-di-forum/125404/change-folder-environment-in-batch</link><description>Hi All 
 I wanted to delete an environment, but i suspect i can&amp;#39;t because it is being used by folders 
 
 I find the folders using this specific envrionment, However I have 1000 of those folders.... 
 
 Any tool to change in batch the environment associate</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: change folder environment in batch</title><link>https://communities.bentley.com/thread/719910?ContentTypeID=1</link><pubDate>Tue, 05 Jul 2022 12:51:55 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8b78f32e-2239-45e4-b37b-68a49889012f</guid><dc:creator>Josh Miller</dc:creator><description>&lt;p&gt;Matt,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Fortunately we are early in our PW deployment. I have removed all of the document attributes. I don&amp;#39;t believe we have any document versions. I would like to avoid copying documents from folder to folder. I was hoping the solution previously outlined here would be viable. If any of this information changes what we would need to do please let me know. I appreciate the help you have already provided.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Josh&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change folder environment in batch</title><link>https://communities.bentley.com/thread/719449?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2022 10:48:24 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4a017b6f-c17e-40b3-8d1b-74ef63f502e8</guid><dc:creator>Matt Kovach</dc:creator><description>&lt;p&gt;Hello Yann,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately, you will need to remove/clear Document Attribute values for any and all Documents that have assigned&amp;nbsp;&lt;span&gt;Document Attribute values &lt;strong&gt;BEFORE changing or removing the Environment&lt;/strong&gt;&amp;nbsp;assigned to the Folder containing said Documents. This will be a challenge if your Folders contain Document Versions as you will not be able to change (remove) Document Attribute values for these &amp;quot;previous&amp;quot; Document Versions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It seems your only course of action, in this situation, would be to copy Documents from the originating Folder(s) to a new or different Folder. This method will allow you to:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Set the desired, new Environment to the new Folder (or not set an Environment at all; Environment = none).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Keep all versions of Documents.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;One&amp;nbsp;downside to this is option that these &amp;quot;copies&amp;quot; would be new Documents. Dependencies (ex. CAD References) would be tricky to handle. You would have to resolve these for these new Documents and you may have trouble removing the &amp;quot;original&amp;quot; Folders and Documents due to previous versions of Documents that contain&amp;nbsp;&lt;span&gt;Dependencies to specific versions of Documents. I haven&amp;#39; tested all of this as we are not using versioned Dependencies. I know...this can be confusing. It&amp;#39;s best to not have to change the Environment for a Folder.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change folder environment in batch</title><link>https://communities.bentley.com/thread/719278?ContentTypeID=1</link><pubDate>Thu, 30 Jun 2022 15:03:46 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:16a7b3f5-2fc8-4438-890d-2a0f801ba98c</guid><dc:creator>Josh Miller</dc:creator><description>&lt;p&gt;Franky, I&amp;#39;m looking at this since I have a similar problem. Using both the tool seems straight forward but I&amp;#39;m a little confused on how to change the environment to overwrite the folder when I import. In other words do I need to modify the aam file or is there a different step?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change folder environment in batch</title><link>https://communities.bentley.com/thread/436734?ContentTypeID=1</link><pubDate>Thu, 30 Nov 2017 13:43:30 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:34808a80-47e0-420d-a0db-3381024da0cb</guid><dc:creator>Yann GREISCHER</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I have the same problem.&lt;/p&gt;
&lt;p&gt;We have 1 folder containing thousands of subfolders and 30.000+ documnents that all need to change the environment.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried the PowerShell method, but that does not work for folders containing documents.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I also tried the PWEXPT &amp;amp; PWIMPT Method, which worked OK, but for documents with different versions, only the last one is exported/imported, and all version information is lost.&lt;/p&gt;
&lt;p&gt;Is there a way to export/import the folders with documnents and keeping all the versions of the documents?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Yann&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change folder environment in batch</title><link>https://communities.bentley.com/thread/397811?ContentTypeID=1</link><pubDate>Mon, 09 Jan 2017 16:54:28 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8f7f4d59-6312-4abd-becc-285e3d646961</guid><dc:creator>Luc Poulin</dc:creator><description>Thank you, unfortunately, i&amp;#39;m not knowledgeable about prowershell....&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change folder environment in batch</title><link>https://communities.bentley.com/thread/397528?ContentTypeID=1</link><pubDate>Fri, 06 Jan 2017 04:44:07 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4b9300c7-160d-44aa-8377-3ef626d58e2f</guid><dc:creator>Franky Riphung</dc:creator><description>&lt;p&gt;Kindly raise a Service Request&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change folder environment in batch</title><link>https://communities.bentley.com/thread/397436?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 13:32:54 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:d28e4e73-a9be-44fc-bdb8-295be3d23644</guid><dc:creator>Peter Willmen</dc:creator><description>Where can I get these &amp;#39;Additional&amp;#39; extensions (PWPS_DAB.dll)?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change folder environment in batch</title><link>https://communities.bentley.com/thread/397434?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 13:13:19 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:d45c6790-6382-4db8-b12d-fb60e2886122</guid><dc:creator>Paul Patterson</dc:creator><description>&lt;p&gt;Powershell is your friend here.&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll likely need to reach out to one of the Bentley folks to get the additional extensions..&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve pasted the contents of my ps1 file below.. unfortunately, I&amp;#39;ve lost all my tab indexes, so it looks a bit gnarly.&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;Warning! Dragons ahead! Use at your own risk! If there&amp;#39;s any uncertainty of the code below, stop, take a deep breath, and ask for help! I had this one saved from a long time ago.. &lt;span style="text-decoration:underline;"&gt;be sure to test in a sandbox environment first!&lt;/span&gt; Also - unsure how this will act on folders that have documents in them.. I likely just tested this on empty folders.&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Paul&lt;/p&gt;
&lt;p&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;#======================================================================================+&lt;br /&gt; | &lt;br /&gt; | Apply Environment to a folder, and subfolders&amp;nbsp;&lt;br /&gt; | P. Patterson&lt;br /&gt; | Note: Functions must be defined before calling them. &lt;br /&gt; +======================================================================================#&amp;gt;&lt;/p&gt;
&lt;p&gt;#--------------------------------------------------------------------------------------#&lt;br /&gt; #Import Modules .. these locations have changed recently&lt;br /&gt; #---------------------------------------------------------------------------------------#&lt;br /&gt; &lt;br /&gt; Import-Module -Name &amp;quot;C:\Program Files (x86)\Bentley\ProjectWise\bin\PowerShell\pwps\PWPS.dll&amp;quot; -Verbose&lt;br /&gt; Import-Module -Name &amp;quot;C:\Program Files (x86)\Bentley\ProjectWise\bin\PowerShell\pwps\PWPS_DAB.dll&amp;quot; -Verbose&lt;/p&gt;
&lt;p&gt;#-------------------------------------#&lt;br /&gt; # Prefs&lt;br /&gt; #-------------------------------------#&lt;/p&gt;
&lt;p&gt;# Stop this script if there are any errors&lt;br /&gt; $ErrorActionPreference = &amp;#39;Stop&amp;#39;&lt;br /&gt; # Write out all debug and verbose messages&lt;br /&gt; $DebugPreference = &amp;#39;Continue&amp;#39;&lt;br /&gt; $VerbosePreference = &amp;#39;Continue&amp;#39;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; #Credentials - change to suit&lt;br /&gt; $ProjectWise = &amp;#39;integrationserver:datasource_name&amp;#39;;&lt;br /&gt; $username = &amp;#39;domain\username&amp;#39;;&lt;br /&gt; $password = &amp;#39;password&amp;#39;;&lt;/p&gt;
&lt;p&gt;# Open an Admin Connection - Probably not required for changing environments..but whatever.&lt;/p&gt;
&lt;p&gt;Open-PWConnection -Admin -DatasourceName $ProjectWise -UserName $username -Password $password&lt;/p&gt;
&lt;p&gt;# Echo what we&amp;#39;re logging into&lt;/p&gt;
&lt;p&gt;write-host $ProjectWise&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; Set-PWEnvironmentByFolderPath -FolderPath &amp;quot;0-Paul&amp;quot; -Environment &amp;#39;Environment_Name&amp;#39; -SubFolders&lt;br /&gt; &lt;br /&gt;Close-PWConnection&lt;/p&gt;
&lt;p&gt;#Always cleanup the function&lt;br /&gt; Remove-Variable ProjectWise&lt;br /&gt; Remove-Variable username&lt;br /&gt; Remove-Variable password&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change folder environment in batch</title><link>https://communities.bentley.com/thread/397400?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 08:40:53 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:29172146-4b2f-4a7f-a227-f40a8f1482e0</guid><dc:creator>Franky Riphung</dc:creator><description>Hi Luc,&lt;br /&gt;
&lt;br /&gt;
Greetings!!!&lt;br /&gt;
Are you trying to change the Environment from one to another? Or just delete?&lt;br /&gt;
It&amp;#39;s important to know that deleting an Environment will result in deletion of all the attributes which has been created for that particular Environment.&lt;br /&gt;
.........................................................................................................................&lt;br /&gt;
&lt;br /&gt;
Currently, we don&amp;#39;t have a specific tool as you require but we do have the PWEXPT &amp;amp; PWIMPT Utility which you can use\try. The Utility can be found under - C:\Program Files (x86)\Bentley\ProjectWise\bin. You will be able to select Multiple folders for Export\Import, &lt;br /&gt;
also if you open the Exported file (.AAM Extension) in a Notepad it will give you additional information.&lt;br /&gt;
&lt;br /&gt;
I suggest you try this tool on a folder or two &amp;amp; update.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>