8 Replies Latest reply on Mar 1, 2012 12:56 PM by Mark Johnson

    Updating All folder data cards

    Mark Johnson

      Hi all,

       

      I'm wondering if there's a way to update all the folder data cards to contain a value from their name. (eg-how to grab their folder name, put the first two letters in a variable in the folder data card and then update all the folder data cards under the Projects folder).

       

      Any help would be appreciated.

       

      Thanks,

      -Mark Johnson

        • Re: Updating All folder data cards
          Kishore Garakipati

          Hello Mark,

           

          Did you tried with the Dispatch tool in EPDM?

            • Re: Updating All folder data cards
              Mark Johnson

              Thanks for the help Kishore,

               

              I didn't know the dispatch tool existed until now.  The problem I am now having is that if you have multiple folders selected, it only takes the value from the first folder using the "NameOfSelectedFile" variable.

               

              A more thourough description:
              I have 5 Main folders in the Vault

              Under one of the Main folders I have 1000 subfolders.

              <Main>\<Parts>

               

              The first two letters of each part folder, are it's "class". (Wire, Rivet, etc).
              I want to set the "Class" variable on all the folders to be based on the first two letters of the folder.
              Currently I have to select each folder manually and update them which is a giant waste of time.

              Using the Dispatch add-in, it's down to three clicks per folder but it would be nice to be able to select them all.

                • Re: Updating All folder data cards
                  Kishore Garakipati

                  Hello Mark,

                   

                  If you think heavy customization (VB.NET) should be the last option in your thought process, the EPDM dispatch itself would allow you to run "Shell execute" where in you could map a small VBA (*.vbs) code that would set the "Class" variable on all the folders as per the logic you mentioned above.

                   

                  As you would know vb scripting is a layman approach to automate some operations in EPDM and we need not be an expert programmer to get the desired automated results.

                   

                  But if you need a robust approach, I think a small add-in using VB.NET itself might address your requirement which could be done in a fairly quick mode.

                   

                  Hope the information helps...!!

                  • Re: Updating All folder data cards
                    Tim Read

                    In Dispatch have you added a "Block" "For All Documents"?

                      • Re: Updating All folder data cards
                        Mark Johnson

                        Yes I have.

                        Apparently it's a bug with the Dispatch tool.  My reseller is making an SR about it.

                          • Re: Updating All folder data cards
                            Tim Read

                            Not the first and certainly won't be the last....

                            • Re: Updating All folder data cards
                              Andries Koorzen

                              Hi Mark. According to my knowledge you don't have to use dispatch. There is a builtin feature inside of EPDM to allow you to update subfolder values with that of the parent folder.

                               

                              Steps to do:

                               

                              Create at least 1 virtual document in the destination vault subfolder which contains the property in question.

                              Now go one level up to the parent folder.

                              Insert the property (e.g. project name)

                              Click modify -> update -> values in files (this will not work unless you have at least one file checked out, hence the virtual doc)

                              Next, Next , Next, Then select the property to update in all the files. You'll notices that during this process EPDM will tell you that it will update the values of the subfolders as well. Next , Next, Finish

                               

                              Presto! Values are updated

                               

                              Edit: Oh yes, you may now delete the virtual file

                                • Re: Updating All folder data cards
                                  Mark Johnson

                                  Thanks for the information. That's not exactly what I wanted to do.

                                  I want to update all the subfolders under their parent folder, with properties from their names (first two letters is one variable value etc).

                                   

                                  My VAR was able to give me a dispatch script I can use one folder at a time, which is better than nothing.
                                  It seems the only way is to use the API and program something myself.