Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why there is Difference in File Size
Message
From
22/03/2014 15:32:45
 
 
To
22/03/2014 15:28:51
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01597120
Message ID:
01597124
Views:
56
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 && 62 KB File is Created
>>
>>*** 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.
Harsh
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform