// this is a Carriage Return Line-Feed CrLf = Chr(13) & Chr(10); // create new array DumpArray = (1); // populate array ArrayAppend(DumpArray, i); [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Stressed_Simon [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> // this is a Carriage Return Line-Feed CrLf = Chr(13) & Chr(10); // create new array DumpArray = (1); // populate array ArrayAppend(DumpArray, i); [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => d.acha [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> line separated file - Macromedia ColdFusion

line separated file - Macromedia ColdFusion

I have line separated file. Every line represent something. I need to extraxt these lines into Array or something else so after that I can process these data. How I can extract this line separated data into Array or maybe You have any other suggestion. Thank in advance. D....

  1. #1

    Default line separated file

    I have line separated file.

    Every line represent something.

    I need to extraxt these lines into Array or something else so after that I can
    process these data.

    How I can extract this line separated data into Array or maybe You have any
    other suggestion.

    Thank in advance.
    D.

    d.acha Guest

  2. #2

    Default Re: line separated file

    Try this:-

    <!--- read file --->
    <cffile action="read" file="full_path" variable="TextVar">

    <cfscript>
    // this is a Carriage Return Line-Feed
    CrLf = Chr(13) & Chr(10);

    // create new array
    DumpArray = (1);
    </cfscript>

    <!--- loop though data and populate array --->
    <cfloop list="#TextVar#" index="i" delimiters="#CrLf#">
    <cfscript>
    // populate array
    ArrayAppend(DumpArray, i);
    </cfscript>
    </cfloop>

    <cfdump var="#DumpArray#">

    Stressed_Simon Guest

  3. #3

    Default Re: line separated file

    Simon,
    Thank You for immediate answer.

    Your solution have made error.
    "Error Occurred While Processing Request
    Object of type class java.lang.String cannot be used as an array"

    26 : <cfscript>
    27 : // populate array
    28 : ArrayAppend(DumpArray, i);
    29 : </cfscript>
    30 : </cfloop>

    ---------------------------
    Following is my code:


    <!--- read file --->
    <cffile
    action = "read"
    file = "#ExpandPath("abda_updates")#\ADR_APO.UPD"
    variable = "TextVar">


    <cfscript>
    // this is a Carriage Return Line-Feed
    CrLf = Chr(13) & Chr(10);

    // create new array
    DumpArray = (1);
    </cfscript>

    <!--- loop though data and populate array --->
    <cfloop list="#TextVar#" index="i" delimiters="#CrLf#">
    <cfscript>
    // populate array
    ArrayAppend(DumpArray, i);
    </cfscript>
    </cfloop>

    <cfdump var="#DumpArray#">

    d.acha Guest

  4. #4

    Default Re: line separated file

    Sorry my mistake. You need to change this line:-

    DumpArray = (1);

    to

    DumpArray = ArrayNew(1);
    Stressed_Simon Guest

  5. #5

    Default Re: line separated file

    Simon,
    In the meantime I have solved it myself, but I have used one part from Your code. That was a good start point for me.

    Thanks onceagain.

    D.

    d.acha Guest

Similar Threads

  1. Author metadata separated by semi-colonstruncated in file properties and "Get Info"
    By Philip_Kiff@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 4
    Last Post: October 6th, 07:32 AM
  2. Exporting Metadata (caption information) fromJPEGS to a comma separated value (CSV) file
    By Jennifer_Preissel@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 1
    Last Post: November 6th, 09:28 AM
  3. How to read a pdf file line by line through IAC
    By rkumaravel@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 6
    Last Post: August 1st, 11:26 AM
  4. how to p blank-line-separated records
    By David T-G in forum PERL Beginners
    Replies: 2
    Last Post: September 16th, 09:32 AM
  5. How to handle a comma separated file with imbedded commas
    By James Edward Gray II in forum PERL Beginners
    Replies: 0
    Last Post: September 2nd, 07:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •