Page 1 of 1

Intermittent Problem Append Folder Name and Renaming Files

PostPosted: Tue Nov 12, 2019 10:19 pm
by bcblmb
Intermittent Problems Appending Folder Name and Renaming File to Sequential Number Starting At One For Each Folder

I have varying numbers of PDF files within 230 folders, there are no subfolders.
The Folders are named a sequential number, space, Street Name: 001 Adams Dr, 002 Adelaid Pl etc.
The PDFs are named 4 digit sequential numbers. The first file in the first folder is named 0001.pdf, the first file in the second folder is named 0023.pdf. The last PDF in the last folder is named 4596.pdf

I want to rename the PDFs to be: Folder Name Seq # starting @ 1 for each folder: 002 Adelaid Pl 0001.pdf, 002 Adelaid Pl 0002.pdf etc.

BRU options I use are:
01 Name Remove
09 Append Folder Name
Name=Prefix
Sep=space
Levels=1
10 Numbering
Mode=suffix
Start=1
Pad=3
Break=0
at=0
Incr.=1
Sep.=blank
Folder = checked
12 Filters
Mask=*
Files=Checked
Subfolders=checked

This works 98% of the time. There are about 70 problems where the PDF name does not increment the sequential number within the folder, but repeats it with a sequential suffix of _1, _2, etc until if finally increments the sequential number within the folder.

Simplest example is:
051 Chestnut Hill 001.pdf
051 Chestnut Hill 001_1.pdf
051 Chestnut Hill 002.pdf
051 Chestnut Hill 002_1.pdf
Suffix of files should have been 001, 002, 003, 004

I have used BRU v3.0.0.1 and v3.3.1.0 on a windows 7 machine with the data on the C: drive.

If I break up the process to append the folder name first and then rename the pdf to start at 0001 for each folder, I have a different the problem.
Folder step PDF names:
051 Chestnut Hill 0525.pdf
051 Chestnut Hill 0526.pdf
051 Chestnut Hill 0528.pdf
051 Chestnut Hill 0529.pdf


Final Names:
051 Chestnut Hill 0525 001.pdf
051 Chestnut Hill 0526 002.pdf
051 Chestnut Hill 0528 003.pdf
051 Chestnut Hill 0528 004.pdf

I would like to do this in one step, but what am I doing wrong?

Re: Intermittent Problem Append Folder Name and Renaming Files

PostPosted: Tue Nov 19, 2019 11:13 pm
by Admin
Hi, I will try to recreate this issue.

In your example:

051 Chestnut Hill 001.pdf
051 Chestnut Hill 001_1.pdf
051 Chestnut Hill 002.pdf
051 Chestnut Hill 002_1.pdf

Suffix of files should have been 001, 002, 003, 004


What were the original file names and their folder name?

Are you able to repeatedly recreate this problem on your end?

thank you