Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: Khurram Tahir
  Where is Khurram Tahir?
 Karachi
 Pakistan
 Khurram Tahir
 Tags
Subject: RE: Checking of Valid File name
Thread ID: 228465 Message ID: 228491 # Views: 1 # Ratings: 1
Version: Visual FoxPro 9 Category: Projects and Design
Date: Tuesday, May 19, 2009 10:57:52 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
>
> \,/,:,*,?,",<,>,|

Let windows do the checking for you

if file(accna)
   return .t.
endif
h=fcreate(accna)
if h>0
   =fclose(h)
   erase (accna)
   return .t.
endif
messagebox('Cannot create the file')
return .f.


Regards
Tushar

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