Can't mass replace folder names.

Advanced Renamer forum
#1 : 12/02-18 04:17
Salvia
Salvia
Posts: 5
Hello there.

I am trying to replace a word that may be found in hundreds of folders with another word using Advanced Renamer.

I add the rename method and I add my folder to the list and I click start batch.
However, I get this error.

"Unknown error: Access is denied
https://i.imgur.com/doCOrfY.png

Does anyone know what to do? I already tried running Advanced Renamer as administrator and also running it with windows file explorer.exe closed.


12/02-18 04:17
#2 : 12/02-18 09:41
Mark
Mark
Posts: 175
Reply to #1:
Firstly, do you mean you are using the "Replace" method?

However, it does sound as if that file may be locked for some reason. Is it a system file?


12/02-18 09:41
#3 : 12/02-18 15:16
Salvia
Salvia
Posts: 5
Reply to #2:
Yes, I am using the "replace" method.
It is selected and is active on the left side of the menu.

I am trying to rename hundreds of folders at the same time and not any files.
Like, find "dog" in folder names and change it to "cat"

The folders are on the D:\ drive whereas Advanced Renamer is installed in the C:\ drive.

I don't know why I got this error,
In other runs I wasn't even able to "run" the operation, and when I would, I would get this error instead.

Help?


12/02-18 15:16
#4 : 12/02-18 16:29
Mark
Mark
Posts: 175
Reply to #3:
OK. Let's start with a single, dummy, test folder on D drive.

I presume these are your steps:

1. Drag the folder (let's say, called "Test" into AR, select "Add the folders", deselect "Add subfolders", select "Add root folders". OK.

2. The main window tab should be on "Rename Folders", the Foldername is Test. The Path should be on your D drive.

3. Add Method "Replace"

4. Text to be replaced = "es", Replace with = "123". In the main window, New Foldername should be "T123t".

5. Start Batch/Start

What happens?



12/02-18 16:29
#5 : 12/02-18 18:02
Salvia
Salvia
Posts: 5
Reply to #4:

- I have followed the steps that you have mentioned and I have been partially successful.
- I have dragged 18,306 folders into the list. I discovered that there is a 20,000 file/folder limit.
- Not all of these folders had the string text that I wanted to replace but some of them did.
- It says that there were 12,827 successful items and that there were 5,479 errors.
- All the errors are the same it is "Unknown error: Access is denied"

- I have went through the folders and found that some of the folders names have been indeed changed the way I wanted them to, but not all of them.

Can you tell me why all of these folder names were not changed, and only some of them were changed?

There are no differences between these folders. (They all have a black square, not a black checkmark on their read only setting in their properties and it says "Only applies to files in folder)

So, we know none of the folders are read-only whereas some files may be read-only.


12/02-18 18:02
#6 : 12/02-18 22:43
Mark
Mark
Posts: 175
Reply to #5:
Salvia,

It can difficult to help from a long way away .... but let's try!

So were the steps I indicated, with a single folder, OK? If so, then the method seems to be correct.

"Can you tell me why all of these folder names were not changed, and only some of them were changed?" Please confirm that the folders that were not changed by AR are the ones it said would not be changed (ie had the error message) ....

Next, can you give an example of a working replace, and once that fails (ie, full filepath/name of the folders). It may be more than just a read-only, though that's a good one to check for. They may be being used by some app (like the OS!).

If it's OK, can you say what you are trying to replace? That may give a clue.

Have you tried copying that failed folder to a a dummy folder (say on C drive) and trying a simple test on it?

Mark

Oh, yes, something else. Before you run the batch (and therefore before you get the error message) does AR tell you in the main window that there are some issues? ie text in red?


12/02-18 22:43 - edited 12/02-18 22:44
#7 : 13/02-18 12:14
Mark
Mark
Posts: 175
Reply to #6:
Coincidentally, I have just come across the same problem.

I tried to rename folders from the form 2018_02_13 to 2018-02-13, using the new name method, <Substr:1:4>-<Substr:6:2>-<Substr:9:2>

I got 23 errors, code 101, Unknown error: Access is denied

After some investigation, I moved those folders to a new location. The renaming still failed.

I then copied them all, and the renaming worked on the copy.

So, it's either an AR issue (over to you, Kim) or it's some weird Windows thing maybe related to the Recycle Bin (I have seen this type of thing in Windows Explorer where folders can't be deleted ….).

Best I can offer is to copy the offending folders to a new location, rename them, copy them back, delete the originals.

Mark


13/02-18 12:14
#8 : 13/02-18 13:50
Mark
Mark
Posts: 175
Reply to #7:
I think I may have resolved this. Maybe. Or it's another issue.

I create a folder "2018_02_13", with a subfolder "2018_02_12" and then another subfolder "2018_02_11". The names don't actually matter. There are 3 folder level, 1, 2 & 3.

I dragged the top level folder into AR, selecting to add subfolders and root folders. The order they appear in the main window is level 2, level 3, level 1.

The rename fails. AR is trying to change something but it actually doesn't recognise on the fly that part of the filepath has changed.

Over to you, Kim!


13/02-18 13:50
#9 : 13/02-18 14:01
Kim Jensen
Kim Jensen
Administrator
Posts: 880
You get this error when Windows denies the name change. This happens more often for folders than for files. If a file from a folder you are trying to rename is open in some program, Windows will not allow you to rename that folder.

Also, Advanced Renamer does not support renaming folders and subfolders on multiple levels in one batch. I will recommend only to rename folders in one single folder level and not include both root and sub folders in the same batch.

If you cannot rename a folder, and you try to copy the folder to some other location, and finds that this folder can be renamed, then it suggests that Windows is holding a lock on the original folder or on some file within that folder.


13/02-18 14:01
#10 : 13/02-18 15:18
Mark
Mark
Posts: 175
Reply to #9:
Hi Kim,

I agree with the first & last paragraphs. This is normal, AR itself does so, not unexpectedly.

Today, I changed a few hundred folders, about 10% caused me trouble resolved by effectively copying them out of their original folderpath, thereby requiring a fresh rename process.

The OP talks of 18306 folders .... with 5479 failing. They can’t all be locked, so the issue is mainly one you describe in paragraph 2.

Back to my simple 3 level example. Whatever I tried seem to fail. Ordering in any manner, ordering in any manner then unticking either child or parent folders .... closing/re-opening AR and the Windows Explorer instance .... something just didn't get released. The only application in play here are Windows Explorer and AR ....

So I shut down any other reference to the dummy folders, and just used the Folder Panel in AR to add the relevant folders, selecting both root and sub folders in the same batch (as a test). Whatever I did (and I did a lot!), AR renames the lowest (deepest) subfolder, then refuses to rename the parent folders. The only way I could progress was to move the renamed folder out of the folder tree and then repeat the process. For 3 levels, this required 3 passes.

Or, as you say, I could rename individual folder levels, one at a time, giving 3 passes again.

My copy workaround is doing the same thing, removing the links in the folderpath, starting a new rename process.

The above is meant to capture my experiments and doesn't seem to offer any other workaround. I don't know the inner workings of AR. Maybe there's some internal hook that isn't being released after a rename action?

Anyway, maybe this helps the OP, if no-one else!

Mark

Ps, a word or warning to others … don't take too long to write a post in the Forum … by the time I came to post, it had timed me out and I lost then post .. lucky I wrote it in Word and that version was still active!


13/02-18 15:18
#11 : 15/02-18 17:46
Salvia
Salvia
Posts: 5
Thanks for the replies.

However, this issue still exists.

I think it may be out of our hands, knowing what computers are like.
Maybe, you guys can make some improvements to this in the future.

See you.


15/02-18 17:46
#12 : 15/02-18 18:27
Mark
Mark
Posts: 175
Reply to #11:

Salvia,

Thanks for posting back.

The lengthy discussion above is somewhat out of scope ... but the takeaway is that AR is not currently set up to manage renaming nested folders.

See Post#9

It is recommended:

“Advanced Renamer does not support renaming folders and subfolders on multiple levels in one batch. I will recommend only to rename folders in one single folder level and not include both root and sub folders in the same batch.”

Maybe the AR creator will update this so it does support multiple levels etc, or maybe he'll remove the options that allow this (in which the problem goes away).

In the meantime, while it may mean more passes, you have a workaround by selecting folders ....

Hope that helps,

Mark


15/02-18 18:27