Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 To: Dale Dedoroy
  Where is Dale Dedoroy?
 Bacolod City, Negros Occidental
 Philippines
 Dale Dedoroy
 Tags
Subject: RE: APPEND GENERAL - "FROM" problem VFP5
Thread ID: 772 Message ID: 782 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Thursday, June 14, 2001 3:17:40 AM         
   


> > I am looking at an idea to scan selected folders/drives for files according to extension e.g. xls, doc and store the full filename in a table. The purpose being to be able to quickly scan the contents of the files when looking for any particular data. That is accomplished by loading the file names into a listview and loading any selected file into a general field for display.
> >
> > The problem is that any file name that contains spaces causes the APPEND GENERAL to fail (Command contains unrecognised phrase/keyword). Can this problem be overcome?
> >
> > *** OLE Control Event ***
> > *!* List View ItemClick
> > LPARAMETERS item
> >
> > LOCAL ncurrarea,cfile
> >
> > cfile = item.text
> > IF NOT FILE(cfile)
> > WAIT WINDOW NOWAIT "File unavailable"
> > RETURN
> > ENDIF
> > ncurrarea = SELECT(0)
> > SELECT oletable
> > APPEND GENERAL gfile FROM &cfile && problem here!!
> > ThisForm.Oleboundcontrol1.Refresh
> > SELECT (ncurrarea)
> >
> > Thanks for any info
>
> Hi,
> Try this:
> APPEND GENERAL gfile FROM "&cfile"
>
> Hth,
> Dale

Hello Guys,

I have had situations in which i got errors when using the & with file names. It seemed that filenames / paths that contain spaces were the problem. Therefore, to be absolutly sure that nothing can go wrong, i'd do it like this:

APPEND GENERAL gfile FROM (cfile)

--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts

ENTIRE THREAD

APPEND GENERAL - "FROM" problem VFP5 Posted by Geoff Hetherington @ 6/13/2001 7:08:41 PM
RE: APPEND GENERAL - "FROM" problem VFP5 Posted by Dale Dedoroy @ 6/13/2001 8:53:11 PM
RE: APPEND GENERAL - "FROM" problem VFP5 Posted by Eric den Doop @ 6/14/2001 3:17:40 AM
RE: APPEND GENERAL - "FROM" problem VFP5 Posted by Geoff Hetherington @ 6/17/2001 8:24:25 PM
RE: APPEND GENERAL - "FROM" problem VFP5 Posted by Geoff Hetherington @ 6/17/2001 8:27:32 PM