[Help]Creating file ?

Posts 1–11 of 11 · Page 1 of 1
[Help]Creating file ?
Hi !

I am creating a hack and I want to create a file in C drive with name "Hax.txt". How can I do it ?
Okay, Here:

Code:
Try
            Dim Write As New System.IO.StreamWriter(SaveFile.FileName)
            Write.Write(Textbox1.Text or RichTextBox1.Text)
            Write.Close()
        Catch ex As Exception

        End Try
Kallisti is trolling you.

You can use IO.File,

IO.File method:

[php]
IO.File.Create("C:\Hax.txt")
[/php]

But be warned, if you're planning on releasing a program that writes a file to a location, a lot of computer don't allow files to be directly created on the C:\ drive from an external source so it may cause some compatibility issues. Just saying.
What you mean .. I don't understand...some one help me plz
Code:
My.Computer.FileSystem.WriteAllText("C:\Hax.txt","TextForFile",False)
Kallisti you god damn troll !!!
Quote Originally Posted by MJLover View Post
Code:
My.Computer.FileSystem.WriteAllText("C:\Hax.txt","TextForFile",False)
Kallisti you god damn troll !!!
Oops, I didn't realise he wanted to add text to it too, my mistake. MJLover's method is much better for it, use it.
Thanks MJLover and Importing, it worked. Thank you
no comment on my suggestion... aww
Quote Originally Posted by Imported View Post


Oops, I didn't realise he wanted to add text to it too, my mistake. MJLover's method is much better for it, use it.
Ya, it depends on the situation !!

Quote Originally Posted by dudezone2 View Post
no comment on my suggestion... aww
Oops...I think he didn't saw yours or idk...but yea your method's good too !!
Quote Originally Posted by MJLover View Post
Ya, it depends on the situation !!



Oops...I think he didn't saw yours or idk...but yea your method's good too !!
Both methods work perfectly, but for the sake of a one line solution, MJ's may have more application.

Dudezone's method is good if you're writing specific lines/writing text from different sources, when "WriteAllText" won't work, so don't get too down about it, it's not like it was a bad suggestion...it just so happened that MJ's example was slightly better suited to the situation
Kallisti, seriously fuck off with the trolling

It's getting annoying. We'll make you a section for your PASIC code later.
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us