Legalising filenames for OneDrive

Advanced Renamer forum
#1 : 27/03-17 11:26
Vic Kusin
Vic Kusin
Posts: 2
I'm using Microsoft OneDrive and I have a lot of documents which contain invalid characters in their filenames that OneDrive will not handle. I've been trying to make a method list that will rename or remove them. The tricky characters to get rid of are leading and trailing spaces and *
I wonder if anyone has created a method list that would do all these in one go ?
Vic


27/03-17 11:26 - edited 27/03-17 11:27
#2 : 27/03-17 14:10
t
t
Posts: 9
Reply to #1:
1. Strip the ff: Characters ~ " # % & * : < > ? / \ { | }." # % * : < > ? / \ |
2. trim front and rear parts of spaces


27/03-17 14:10
#3 : 27/03-17 17:12
G. Lambany
G. Lambany
Posts: 187
Reply to #1:
Method #1: Replace
Text to be replaced: [\<\>\:\"\/\\\|\?\*]
Replace with (one space):
Occurence: All
use regular expression: checked

Method #2: Replace
Text to be replaced: ^\s?(.+?)\s?$
Replace with: \1
use regular expression: checked

cheers


27/03-17 17:12
#4 : 28/03-17 13:28
Vic Kusin
Vic Kusin
Posts: 2
Reply to #3: Brilliant, thank you.



28/03-17 13:28