Discussion:
long file name
(too old to reply)
Wilson Thomas
2004-12-03 23:42:35 UTC
Permalink
Dear friends,

I am using VFP 6 and I am facing some problem with long file name.

I get a text file name using this command
lcFileName = GETFILE( '', 'Data File:' , 'Pick' , 0 )

Then I add that file to VFP table using
APPEND FROM &lcFileName DELI

APPEND line gives error for long file names.
Any way to accept long file names

Wilson
Mike
2004-12-03 23:54:05 UTC
Permalink
How about...
APPEND FROM (lcFileName) DELI

-mike
Post by Wilson Thomas
Dear friends,
I am using VFP 6 and I am facing some problem with long file name.
I get a text file name using this command
lcFileName = GETFILE( '', 'Data File:' , 'Pick' , 0 )
Then I add that file to VFP table using
APPEND FROM &lcFileName DELI
APPEND line gives error for long file names.
Any way to accept long file names
Wilson
Cindy Winegarden
2004-12-04 17:56:34 UTC
Permalink
Hi Wilson,

What is the name of the file? Does it have spaces? If we have a name to test
with we can help you more.
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
Post by Wilson Thomas
Dear friends,
I am using VFP 6 and I am facing some problem with long file name.
I get a text file name using this command
lcFileName = GETFILE( '', 'Data File:' , 'Pick' , 0 )
Then I add that file to VFP table using
APPEND FROM &lcFileName DELI
APPEND line gives error for long file names.
Any way to accept long file names
Wilson
Wilson Thomas
2004-12-06 22:13:14 UTC
Permalink
I cannot give you a file name or folder name. It depends on how customer
names it. There can be spaces or other chars. If no spaces and other chars,
there is no problem. With spaces and other chars, always problem.

Wilson
Post by Cindy Winegarden
Hi Wilson,
What is the name of the file? Does it have spaces? If we have a name to test
with we can help you more.
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
Post by Wilson Thomas
Dear friends,
I am using VFP 6 and I am facing some problem with long file name.
I get a text file name using this command
lcFileName = GETFILE( '', 'Data File:' , 'Pick' , 0 )
Then I add that file to VFP table using
APPEND FROM &lcFileName DELI
APPEND line gives error for long file names.
Any way to accept long file names
Wilson
Cindy Winegarden
2004-12-07 01:50:23 UTC
Permalink
Hi Wilson,

The following worked for me in VFP9 and also in VFP6:

cString = ["One", "Two", "Three"]
cPath = "C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\VISUAL FOXPRO 9.0
PROFESSIONAL - ENGLISH\"
cFileName = "This, is $ a Funny # File.Name.txt"

StrToFile(cString, cPath + cFileName)
cFile = GetFile("", "Data File:" , "Pick" , 0 )

? "Is file present? " + Transform(File(cPath + cFileName))

Create Cursor Test (Field1 C(10), Field2 C(10), Field3 C(10))
*-- Append From (cPath + cFileName) Delimited
Append From (cFile) Delimited
Browse

Erase (cPath + cFileName)
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
Post by Wilson Thomas
I cannot give you a file name or folder name. It depends on how customer
names it. There can be spaces or other chars. If no spaces and other chars,
there is no problem. With spaces and other chars, always problem.
Wilson
Post by Cindy Winegarden
Hi Wilson,
What is the name of the file? Does it have spaces? If we have a name to
test
Post by Cindy Winegarden
with we can help you more.
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
Post by Wilson Thomas
Dear friends,
I am using VFP 6 and I am facing some problem with long file name.
I get a text file name using this command
lcFileName = GETFILE( '', 'Data File:' , 'Pick' , 0 )
Then I add that file to VFP table using
APPEND FROM &lcFileName DELI
APPEND line gives error for long file names.
Any way to accept long file names
Loading...