FiNAlzFiNAle Posted March 14, 2006 Share Posted March 14, 2006 Hi, I would like to know how can I delete a character from a text file using FileWrite. Do I need to FileWrite the backspace character ? If yes then how ? Thank You Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 14, 2006 Moderators Share Posted March 14, 2006 Hi, I would like to know how can I delete a character from a text file using FileWrite. Do I need to FileWrite the backspace character ? If yes then how ? Thank YouLook closely#include <file.au3> Local $Path2File = 'Path2File' Local $nArray = '' Local $NEW_FILE = @DesktopDir & '\NEW_TXT.TXT' _FileReadToArray($Path2File, $nArray) For $i = 1 To UBound($nArray) - 1 If StringInStr($nArray[$i], 'StringINeed2Find') Then $blah = $blah & StringReplace($nArray[$i], 'ChangeThis', '') & Chr(01) FileWriteLine($NEW_FILE, $blah) Else $blah = $blah & Chr(01) FileWriteLine($NEW_FILE, $blah) EndIf Next $blah = StringSplit(StringTrimRight($blah, 1), Chr(01)) For $x = 1 To UBound($blah) - 1 FileWriteLine($NEW_FILE, $blah[$x]) Next Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
FiNAlzFiNAle Posted March 14, 2006 Author Share Posted March 14, 2006 ok thank you ! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 14, 2006 Moderators Share Posted March 14, 2006 Your quite welcome... You might also want to take a close look at StringRegExpReplace() Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now