# I need to create a new file to write some tasks on the server using logging

## how to create tasks to write file in same time for logging

There are at least two built-in methods to create a file and write data to it. The first is to use the Out-File cmdlet: $text = 'Hello World!' | Out-File$text -FilePath C:\data\text.txt. To overwrite an existing file, use the –Force switch parameter. You can also create files using the Export-Csv cmdlet, which exports the output into a csv file that can be opened in Excel: PowerShell: Create, Delete, Copy, Rename and Move Files Create a document in Word Using fs As FileStream = File.Create(path, 1024) Dim info As Byte() = New UTF8Encoding(True).GetBytes("This is some text in the file.") ' Add some information to the file. fs.Write(info, 0, info.Length) End Using ' Open the stream and read it back. The cat command is mainly used to read and concatenate files, but it can also be used for creating new files. To create a new file run the cat command followed by the redirection operator > and the name of the file you want to create. Press Enter type the text and once you are done press the CRTL+D to save the files. cat > file1.txt How to Create a File in Linux i want to write log message in file, in many case,should create many tasks to write in same time, by appending text into the file using FileIO.AppendTextAsync. Create a document. On the File tab, click New. In the Search for online templates box, enter the type of document you want to create and press ENTER. Tip: To start from scratch, select Blank document. File.Create Method (System.IO)