How Do I Replace / or \ In All Folder Names and Filenames in Parent Folder and All Sub Folders

I need to replace any occurrence of / or \ in a folder name and all sub folder names and filenames within that parent folder.

What do you want to replace them with?

ah.... how about a - or a _

Try @Nige_S’s macro here:

1 Like

Hey @troy,

I'd use Name Mangler myself.



I downloaded
Search and Replace All Files in Folder - macro
Do you know if this replaces all sub folder name and file names in the Local__FolderPath ??

The For-Each is marked as recursive, so I reckon.

Test on a test folder.


Yes - it mentions “recursive” which is why I suggested it.

However, there’s one thing I never do with KM and that’s file/folder renaming. The Mac app I use is Name Mangler There are plenty of other apps and even command-line tools native to MacOS that you can use, but I’ve found Name Mangler to be very easy to use, powerful and incredibly fast.