5 Replies Latest reply on Apr 28, 2008 12:07 PM by robodope

    Batch Rename

    robodope
      Hi,

      I'm using RH7 on XP Pro V2002 SP2.

      I need to translate all instances of uppercase letters to lowercase. Oddly, in many instances the image filename in the File List is all lowercase, but the Project Pod and .htm references have uppercase.

      In any event, I have an xslt to do the job, and my .htm files are well-formed (or will be).

      However, I'm not sure which application files should also be updated. And I noticed at least one MS Access file. Would that need updating, as well?

      And, of course, the obvious question is whether or not this is a worthwhile project. I don't want RH to overwrite any changes when we generate the WebHelp.

      We just have thousands of these filenames, links and references to update. There are only two of us:)

      Please help.
        • 1. Re: Batch Rename
          MergeThis Level 4
          Invest in FAR (a great tool), or have someone in your organization familiar with Perl create a script that runs against the output files.

          We use both, for varying reasons.


          Good luck,
          Leon
          • 2. Re: Batch Rename
            Peter Grainge Adobe Community Professional
            Shaun

            I think you mean changing the case of the source files?

            I had to do this across a merged webhelp project and it was not a fun ride.

            - The files themselves have to be changed.

            - All references to them have to be changed.

            - RH's internal files have to be aware of those changes.

            The difficulty arose in my case because I had links in one project to files in another project. Ordinarily if you change a filename in a project, RH amends all the links to that file and its internal files. If you just change the case though, it might appear to take but when you reopen the project, it has not. You have to do the old two stage process, Filename.htm to filename1.htm to filename.htm. That works and does all the other updating for you.

            The only other way involves writing a regular expression (a formula that finds text that meets the criteria) and then manipulates it. I had, and may still have, one that worked for me but to go that route involves:

            1] Deleting the CPD.

            2] Purchasing a program called PowerGrep and educating yourself how it works.

            3] Using PowerGrip to run the regular expression against all the files except images and certain other files.

            4] Prayer

            5] Reopening the project.

            6] Pulling out a copy of the backup you made and repeating that process a few times until you get it right.

            You might just find it is quicker to rename the files manually and let RH do the tidying up.

            • 3. Re: Batch Rename
              Captiv8r Adobe Community Professional & MVP
              Hi all

              I'm a bit unsure of why the requirement exists. Is it perchance because you are creating WebHelp output intended to be placed on a UNIX box? If so, when you click File > Generate Primary Layout, you should see the first of several intermediate dialogs. On the first is an option labeled "Use Lowercase File Names". Wouldn't this do the trick?

              As I understand the feature, it converts all filenames and references inside files to lower case so everything will work in UNIX.

              Just a thought... Rick
              • 4. Re: Batch Rename
                robodope Level 1
                Thanks, Leon.

                I'm pretty sure I won't be able to invest in anything for this, nor tap a resource outside the department given that I've got an xslt that I've tested on a few files; it works fine.

                I just need to make sure that all the application files (.hhc, .hhk etc.) are updated, too. Not being familiar with the application, I was hoping someone here could educate me.

                For instance, what file is used to load the project manager pod? I've noticed discrepancies between a filename on C-Drive, and the same file in the Project Manager tree. On C, it's buttondelete.jpg, but on the Project Manager list, it is button Delete.jpg.

                This leads me to believe that either:
                a) there is an xml file for images that similar to the .apj or .fpj files used to store topic names and htm filenames (I found an images.fpj file, but it's empty), or

                b) image names are loaded from a database, perhaps Access.

                Thanks.
                • 5. Batch Rename
                  robodope Level 1
                  Thanks, Peter.

                  I actually read your site a few days ago and couldn't help but be a little envious. Were we updating WebHelp on a Unix box, I'd be fine...because I'd write a script and be done with it...but...

                  We're updating and generating on Windows. The help is published on Unix.

                  Rick is correct, and thank you. btw. We do use the lowercase filenames feature. Perhaps I failed to mention that we use VSS, which I believe is also on Unix. All the filenames in VSS are lowercase. The problems are the references in the HTML files, and some obscure application file that won't allow us to rename the files within the project.

                  Thanks again, Peter. It's the right solution; I just don't know how to do that in Windows. Perhaps I could figure it out, but it's beyond the scope of my title (I might get into trouble:) And thanks, Rick. However, the lowercase function doesn't seem to output lowercase filename references.

                  Quite a conundrum.