Jump to content
Sign in to follow this  
Lost

Converting a file and writing in lines

Recommended Posts

Lost

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.

Share this post


Link to post
Share on other sites
Jos

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Lost

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

Share this post


Link to post
Share on other sites
Jos

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.