I don't know of any way. You can manually create the second file, as you do in your second example.
But, why are you doing this at all?
1. You start with 8006981968.ps, which is a PostScript (text) file
2. You import into a VFP cursor. This has 2 potential issues:
a) It pads all lines to 254 characters
b) If any line is more than 254 characters, it gets truncated (any extra is cut off/lost)
3. You convert back to a different text file
Why are you doing this? Are you trying to do some cleanup of the original .ps file?
>Ok, Than is there any way I could Trim Those Lines before copy as I feel that First Method is faster than the second.
>
>>>Hi All,
>>>
>>>I Create a File Using the following two ways.
>>>
>>>
>>>*** First Method
>>>Create Cursor BILL (POS Varchar(254))
>>>APPEND FROM 'D:\HARSH\8006981968.ps' SDF
>>>COPY TO C:\2.ps TYPE SDF
>>>
>>>*** Second Method
>>>Create Cursor BILL (POS Varchar(254))
>>>APPEND FROM 'D:\HARSH\8006981968.ps' SDF
>>>Set Textmerge On
>>>Set Textmerge To ('C:\2.ps') Noshow
>>>Scan
>>>\\<< TRIM(POS) >>
>>>\
>>>Endscan
>>>Set Textmerge To
>>>Set Textmerge Off
>>>
>>>
>>>The file created by second Method is of 14 Kb as of my orginal File that was appended.
>>>
>>>Both File works fine, but why is the difference.When I open both the files in notepad, i don't find any difference.
>>
>>In your first file, every line in 2.ps is 254 characters long. There are enough spaces at the end of each line to pad its length to 254. You can check this in Notepad by pressing the End key on any line, you will see in most cases the cursor will go past the "visible" end of the line.
>>
>>In your second file, the line lengths are not padded, you are writing the trimmed values. In Notepad you will see the lines have different lengths and none extend past the last visible character.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up