Jump to content

Delete a line that starts with "\"


Recommended Posts

Here's an example:

#Include <Array.au3>
#Include <File.au3>
$file1 = FileOpenDialog("Input", @scriptdir, "Text Documents (*.txt)", 1)
$file2 = FileOpenDialog("Output", @scriptdir, "Text Documents (*.txt)", 1)
Dim $array
_FileReadToArray($file1,$array)
Dim $NewArray[1]
For $i = 1 to $array[0]
   If Stringleft($array[$i], 1) <> "/" Then _Arrayadd($NewArray, $array[$i])
Next
_arraydelete($NewArray,0)
_FileWriteFromArray($file2,$NewArray)
Link to comment
Share on other sites

Here's an example:

#Include <Array.au3>
#Include <File.au3>
$file1 = FileOpenDialog("Input", @scriptdir, "Text Documents (*.txt)", 1)
$file2 = FileOpenDialog("Output", @scriptdir, "Text Documents (*.txt)", 1)
Dim $array
_FileReadToArray($file1,$array)
Dim $NewArray[1]
For $i = 1 to $array[0]
   If Stringleft($array[$i], 1) <> "/" Then _Arrayadd($NewArray, $array[$i])
Next
_arraydelete($NewArray,0)
_FileWriteFromArray($file2,$NewArray)
Thanks for the quick answer, it works...

Thanks for the help foster74.

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...