Announcement

Collapse
No announcement yet.

File Rename Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • File Rename Question

    Okay, I'm a newbie and want to use the program to do batch file renames, but I don't seem to be swift enough to accomplish the feat.

    For example, let's say I have a group of files (with various names, nothing in coomon) and want to rename them all to file1.txt, file2.txt...etc.

    In the old mask area I am putting .*, which seems to be selecting all of the files.

    In the new mask, I put file?.txt (as the help file indicates and which makes intuitive sense), but the program suggests the target filename is invalid. If I try file*.txt instead, I get the same error. If I just put file.txt, it renames the first file and then complains the file already exists when it attempst to rename the second file in the batch process.

    It appears the problem is with my wildcard character, but I don't know what to use.

    Any help would be greatly appreciated.

  • #2
    Re: File Rename Question

    Please post some example source and target file names so we can help you come up with a good rename mask.

    You can copy file names using Actions|Copy Filenames.

    Also make sure you're running the latest version 2.2.5. Rename bugs were fixed in version 2.2 and 2.2.4, so if you're running an older version you may have problems with renames.
    Chris K Scooter Software

    Comment


    • #3
      Re: File Rename Question

      One more thing.

      BC doesn't support automatic numbering at this point, so if the source file names don't contain 1, 2, 3, etc in them, it won't be possible to do a mask rename to generate the numbering.
      Chris K Scooter Software

      Comment


      • #4
        Re: File Rename Question

        I downloaded the evaluation version and this is what is in the help file. It's exactly the thing that I would like to do:

        =========
        If the following files are selected, the Old Name field will be "abc?.txt".

        abc1.txt
        abc2.txt
        abc3.txt

        If you change New Name to "abc?.bak", then the files will be renamed to:

        abc1.bak
        abc2.bak
        abc3.bak

        Or, change New Name to "xyz?.txt" and the files will be renamed to:

        xyz1.txt
        xyz2.txt
        xyz3.txt
        ========

        I guess I'm reading soemthing wrong into what is being explained here.

        Let's say I have filea.txt, fileb.txt, filec.txt and smith.txt. I would like to rename them all to something related to bank...ideally bank1.txt, bank2.txt, bank3.txt, bank4.txt...or a variant like banka.txt, bankb.txt, etc.

        What's the closest approximation of what I'm trying to do, or is what I'm trying to do too far out of the ballpark?

        Thanks...

        Alf

        Comment


        • #5
          Re: File Rename Question

          BTW, I didn't throw smith.txt in there to be a smarta$$, but this is the kind of thing I'm faced with often. I have a group of files with unrelated names (but that are related topically) and I want to rename them to express the topic in a batch process, as the example above would illustrate.

          Comment


          • #6
            Re: File Rename Question

            Given the starting files:
            filea.txt
            fileb.txt
            filec.txt
            smith.txt

            if you select:
            filea.txt
            fileb.txt
            filec.txt

            And do a DOS Compatible rename with the mask "bank?.txt", it will rename the files to:
            banka.txt
            bankb.txt
            bankc.txt

            It is not possible to rename them to bank1.txt bank2.txt, bank3.txt with a mask, because there isn't a way to specify a transform of a -> 1, b->2, etc. It also won't work to try to rename smith.txt to bankd.txt in the same rename because smith.txt doesn't match the bank?.txt mask.
            Chris K Scooter Software

            Comment


            • #7
              Re: File Rename Question

              There isn't really a good way to handle files with compeletely unrelated names. You can add or subtract text from files with unrelated names, but it isn't possible to sequentially number them.
              Chris K Scooter Software

              Comment


              • #8
                Re: File Rename Question

                Im trying to take the following file names:

                one.h
                two.h
                three.h
                four.h

                and rename them to:

                yay_one.h
                yay_two.h
                yay_three.h
                yay_four.h

                I can't seem to accomplish this... any ideas?

                Tyler

                Comment


                • #9
                  Re: File Rename Question

                  You can do this using a regular expression rename.

                  Use the old mask (.*) and the new mask yay_$1.

                  Putting () around an old mask item saves it in $1, $2, etc in order left to right.
                  Chris K Scooter Software

                  Comment

                  Working...
                  X