illegal characters in path

Jason-Engage

Новичок
Регистрация
30.05.2013
Сообщения
5
Благодарностей
0
Баллы
0
Hi I'm trying to copy (or write) to a file that doesn't exist. In some cases the app creates the file, in others it says 'illegal characters in path.' What are these illegal characters? (I noticed that '-' might be an illegal character, so I removed it, but I still get the msg.

It seems to work sometimes, and other times it doesn't...

ps. I run a test existance first, if doesnt exist, i 1) Try to copy a blank version or 2) Use the write text to a non-existant file. (writing text to non-existent file, seems to create one... sometimes..)

thanks
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
682
Баллы
113
\ / : * ? " < > | are illegal characters in file names or paths. You can easily take care of all of these by using wordprocessing and Replace.

Put this string in for what to search for... \\|/|:|\*|\?|"|<|>|\| and use Regex as the search type. In the what to replace you can put anything you want except for those characters of course... {-String.Space-} works nicely.
 

Jason-Engage

Новичок
Регистрация
30.05.2013
Сообщения
5
Благодарностей
0
Баллы
0
Thanks I'll give it a try. I also found out that there were line breaks in my text file that I could only see using notepad++.
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
682
Баллы
113
You can fix those by adding this to the regex.... /\r\n+|\r+|\n+|\t+/i
 
  • Спасибо
Реакции: winlingt

winlingt

Client
Регистрация
21.10.2021
Сообщения
8
Благодарностей
2
Баллы
3

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)