import fails to get a comma
Brian K. White
brian at aljex.com
Sun Oct 2 17:56:08 PDT 2005
----- Original Message -----
From: <root at ynotdemo.com>
To: <filepro-list at lists.celestial.com>; <tony at ynotsoftware.com>
Sent: Sunday, October 02, 2005 7:38 PM
Subject: import fails to get a comma
> hi experts,
> i am importing in a list of files names (from ls -Q) and then using
> filepro
> import for each file name obtained to read in the data & post to filepro
> files.
> it's working great & the result is parsing emails for automatic followup.
>
> The problem i have is the name list, see below, includes a comma and
> filepro import ignores the comma. I have a typical tony 100 line work
> around, but i am hoping someone has a suggestion as to a better way to
> obtain the file names with the comma.
>
> any help is appreciated.
> ( even a way to globally rename the files without the comma)
> old tony freehauf
> (the system is filepro 5.0 linux)
>
> sample of file names below:
> "1128123527.3782831321.gmcmotors:2,T"
> "1128123709.0554931446.gmcmotors:2,T"
> "1128125574.0300732003.gmcmotors:2,T"
> "1128126100.7334532283.gmcmotors:2,T"
> "1128126130.1069832440.gmcmotors:2,S"
> "1128126136.5080332462.gmcmotors:2,T"
> "1128126256.0462432496.gmcmotors:2,S"
> "1128126374.1713732569.gmcmotors:2,RST"
> "1128126510.8973932698.gmcmotors:2,T"
> "1128126657.9106190467.gmcmotors:2,S"
You didn't say what your import command exactly looks like, what options you
used on it.
easiest way is probably just
then: import word file = list.txt
then: aa = file(1)
...
import word, with no extra r= f= o= c= options necessary, does csv
correctly, including commas inside quotes.
in your case, there isn't even one comma that import word would see so every
record will just have a field 1 but that's fine.
you could also say
import ascii file = list.txt r=\n f=\n o=" c="
aa = file(1)
or it looks to me like it might be useful (depending on what all you want to
do in processing)
to break the line into fields at the .'s and reassemble the complete file
name in processing where you you need that.
import ascii item = filelist.txt r=\n f=. o=" c="
Customer = item(1)
Job = item(2)
Type = item(3)
File = Customer { "." { Job { "." { Type
and Type will contain the : and the , no problem
Brian K. White -- brian at aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!
More information about the Filepro-list
mailing list