VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Creates files,folders,and write in the file.

by S Lord X (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 1st September 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Creates files,folders,and write in the file.

API Declarations


' A form with a create button.

Rate Creates files,folders,and write in the file.



Dim txt as TextStream

Private Sub Create_Click()
mkdir("d:\\My Folder")
chdir("D:\\My Folder")
Set txt = FSO.CreateTextFile("D:\\My Folder\\My File.txt",TRUE)
txt.WriteLine("This is a sample text.")
txt.Write ("this is on the same line!")
txt.WriteBlankLines (10) 'writes 10 blank lines
txt.WriteLine("Ending text!!!!") 'ending text
txt.close
End Sub

Download this snippet    Add to My Saved Code

Creates files,folders,and write in the file. Comments

No comments have been posted about Creates files,folders,and write in the file.. Why not be the first to post a comment about Creates files,folders,and write in the file..

Post your comment

Subject:
Message:
0/1000 characters