Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Khurram Tahir
  Where is Khurram Tahir?
 Karachi
 Pakistan
 Khurram Tahir
 To: M. Akram Bhatti
  Where is M. Akram Bhatti?
 Riyadh
 Saudi Arabia
 M. Akram Bhatti
 Tags
Subject: RE: Checking of Valid File name
Thread ID: 228465 Message ID: 228468 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Projects and Design
Date: Tuesday, May 19, 2009 8:59:32 AM         
   


> > Q1. I have a field name Accna C 30 contains any character , i want to use this field data as name of a File of any format
> >
> > Following charcters not allowed as File name , How can i check & remove these character from my field Accna while saving as File name
> >
> > \,/,:,*,?,",<,>,|
>
> While saving you can check for the existence of these characters in accna and if found, not allow user to save it.
>
>
If "\" $ accna OR "/" $ accna OR ":" $ accna && for all characters you want to restrict
>   MsgBox("Invalid characters found in the account name")
>   Return .f.
> ELSE
>   Return .t.
> ENDIF
> 

>
> Regards,
> Akram

Q. How can i replace these character if found in Accna with space

e.g.

lcAccna = Accna

lcAccna=CHRTRAN(lcAccna,'/','')

Now here in 1 command how can i replace all not allowed charcters in file name with space

ENTIRE THREAD

Checking of Valid File name Posted by Khurram Tahir @ 5/19/2009 8:43:45 AM
RE: Checking of Valid File name Posted by M. Akram Bhatti @ 5/19/2009 8:53:57 AM
RE: Checking of Valid File name Posted by Khurram Tahir @ 5/19/2009 8:59:32 AM
RE: Checking of Valid File name Posted by M. Akram Bhatti @ 5/19/2009 9:06:26 AM
RE: Checking of Valid File name Posted by Borislav Borissov @ 5/19/2009 10:00:41 AM
RE: Checking of Valid File name Posted by M. Akram Bhatti @ 5/19/2009 9:32:41 AM
RE: Checking of Valid File name Posted by Joseph Agarpao @ 5/19/2009 9:44:11 AM
RE: Checking of Valid File name Posted by tushar @ 5/19/2009 10:57:52 AM