Jump to content

Converting a file and writing in lines


Lost
 Share

Recommended Posts

Hi Guys

I have a problem and not to sure where to start.. this is still a bit new to me..

I have a .dat file that i need to convert to a .txt and then add 5 lines to it starting at line 270. Then i need to convert it back to a .dat file.

Link to comment
Share on other sites

  • Developers

what does converting mean ?

when its a normal test type file you can add lines a the given spot by using:

#include <File.au3>
_FileWriteToLine ( $sFile, $iLine, $sText [, $fOverWrite] )
Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Hi When i say converting i mean renaming the file from test.dat to test.txt so i can edit it..

Don't see a need to rename it first.....

Just look up the func I mentioned in the helpfile and give it a try on the original filename.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...