How to go to end of file? Log Out | Topics | Search
Moderators | Edit Profile

X-Ways Support Forum » Advanced Features » How to go to end of file? « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Need Pass
Username: needpass

Registered: N/A
Posted on Saturday, Aug 23, 2008 - 22:35:   

I want to go to the last byte of a open file using script.

My problem is:
given a JPEG file I want to trim all that follows the End Of Image signature 0xFFD9.

Thanks,
Francesco
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann
Username: admin

Registered: 1-2001
Posted on Sunday, Aug 24, 2008 - 7:21:   

Then search for that footer signature, and when found, select a block that spans the area from the byte after the footer signature to the last byte in the file, and then use the Remove command.
Top of pagePrevious messageNext messageBottom of page Link to this message

Need Pass
Username: needpass

Registered: N/A
Posted on Sunday, Aug 24, 2008 - 14:17:   

Thanks Stefan,
but I need the script command to go to the last byte of the file!

A command like "Goto End Of File"

Francesco
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann
Username: admin

Registered: 1-2001
Posted on Sunday, Aug 24, 2008 - 15:08:   

No, you don't need such a command, you can create this functionality with the existing commands.

Assign Ofs GetSize
Assign Ofs (Ofs-1)
Goto Ofs
Top of pagePrevious messageNext messageBottom of page Link to this message

Need Pass
Username: needpass

Registered: N/A
Posted on Sunday, Aug 24, 2008 - 15:23:   

Thanks Stefan ;)

Add Your Message Here
Post:
Username: Posting Information:
Only registered users may post messages here, i.e. you need to have an account.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:
Forum operated by X-Ways Software Technology AG.