Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find a valid Name of Folder
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01288621
Message ID:
01472945
Views:
45
Check against

Invalid characters in Path and File Name



>Hi Borislav,
>
>i use your method.validname
>
>i have a probleme with "\DATAS\73221439-Les_Bouleaux_S.a.\"
>
>i can't create a FTP Folder with this customer..?
>
>do you have a idea ?
>
>Thank in advance.
>
>
>
>
>
>>>Hi all,
>>>
>>>I want a function to find a valid name of fich to record on HDD.
>>>This name of fich is a compagny Name.
>>>
>>>
>>>cCompagnyName = [Résidence "la belle fleur" ( * Sanatorium ) ]
>>>Must be
>>>cCompgnyFich = [Résidence la belle fleur ( Sanatorium ) ]
>>>
>>>
>>>
>>>Thank in advance for help
>>>
>>>Bernhart
>>
>>Write your own where remove all BAD chars:
>>
>>
>>cCompagnyName = [Résidence "la belle fleur" ( * Sanatorium ) ]
>>?ValidFolderName(cCompagnyName)
>>
>>FUNCTION ValidFolderName(lcFolderName)
>>
>>LOCAL lcBadChars
>>lcBadChars = ["'*?/\] && Add all chars you want to remove here
>>lcFolderName = CHRTRAN(lcFolderName,lcBadChars,[])
>>DO WHILE AT([  ], lcFolderName) # 0 && Remove all double spaces
>>   lcFolderName = STRTRAN(lcFolderName,[  ],[ ])
>>ENDDO
>>RETURN lcFolderName
>>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform