check and convert file names for windows compatibility

I need a task to check all file names in my shared data folder and make hem windows compatible. But I already struggle on my first rule: File names are not valid if they start with Space ! I did not find any way to make this rule.