The TXT file type is primarily associated with 'Text File'. Open in Notepad, WordPad, or many other programs designated as text editors. A true text file will be pure ASCII text with no formatting.
Questions tagged [text-files]
6722 questions
1
vote
2 answers
How to read multiple texts files, where we read all text files only of same group?
I have several text files in my directory like this,
id-2020-01-21-22.txt
id-2020-01-21-23.txt
id-2020-01-22-00.txt
id-2020-01-22-01.txt
id-2020-01-22-02.txt
id-2020-01-23-00.txt
id-2020-01-24-00.txt
So how can i read them like where I read…

WannabeSmith
- 435
- 4
- 18
1
vote
1 answer
Replace lines in files on powershell
I have the following scenario. I have a huge text that is full of words with a REPLACEMENT_CHARACTER "�". My script has already produced a dictionary that provides the correct Translation of theses words by using key value pairs. It Looks…

ImperatorMing
- 47
- 1
- 8
1
vote
5 answers
I would like some advice why this would not insert data into my SQL table
Following is my code:
import MySQLdb
def insert_popularity(PersonNumber, Category, Value):
# make a connection to the dataabse
connection = MySQLdb.connect(host='localhost', user='root', \
passwd='password',…

Alana
- 19
- 1
- 4
1
vote
1 answer
How to import multiple txt files in R and add new header?
I have 8 text files with no headers all saved, my goal is to read them all in and combine them into one file. I also want to add the column names but keep getting an error. My code so far is:
txt_files_ls = list.files(path=mypath,…

Brian Gal
- 13
- 2
1
vote
2 answers
how can I add new lines in txt using java, and without empty spaces
When I am writing text in this txt file, there either is no space between the new string and the old existing string, or there is extra lines, which messes up my other algorithms.
public String writeStudent(String file, String name)
…

Steven Oh
- 382
- 3
- 14
1
vote
3 answers
Python- how to write to text file without deleting contents
I am new to programming and was wondering if anyone can help me. I have created a program below that enables me to write to the text file. I have a third Column called flower_quantity. I was wondering how I can update the text file with the code…

Monica Mc Mullan
- 11
- 1
- 3
1
vote
0 answers
How to read a text file ( UTF-8) line by line and put data in Sql DataBase file using Sql query in a php environment
I have data stored in text file ( UTF-8 ) , each line has data for a separate column in database.
I have stored data in a sequence. I need to read the file and store each line as an Array then use these Array in a SQL query to put data in MySql…

qasim
- 29
- 3
1
vote
1 answer
Arduino. Send text file from SD card to web server
I have a, Arduino sketch that every 10 minutes, writes temprature data to SD text file and post that data to web server.
In case of internet connection loss, the sketch continues to save data to SD text file (but not post it to web).
When the…

Elias Giannopoulos
- 134
- 2
- 11
1
vote
0 answers
Post text file upload to WCF Data Service from JQuery
Uploading and downloading files using wcf data services?
How can we implement this on the wcf data service end and using html+jquery as client?

pkaur
- 11
- 3
1
vote
2 answers
How to copy *.csv to one txt file in same directory? Using PowerShell
In C:Temp I have 5 csv files, how I copy all to one file.txt?
Thanks
Josef

Josef
- 11
- 2
1
vote
2 answers
Debugging Trivia game in Python
Creating function to print question, add choices to a list.
def print_et_list ():
answer_list = []
function = open ("modStory.txt","r")
#Question
question = function.readline()
print question
#Choices
one =…

Louis93
- 3,843
- 8
- 48
- 94
1
vote
1 answer
How to replace a line on the middle of a txt file in C?
I am reading info (numbers) from a txt file and after that I am adding to those numbers, others I had in another file, with the same structure.
At the start of each line in the file is a number, that identifies a specific product. That code will…

PTt
- 11
- 4
1
vote
4 answers
How to divide numbers from a text file?
This is my file text:
Covid-19 Data
Country / Number of infections / Number of Death
USA 124.356 2.236
Netherlands 10.866 771
Georgia 90 NA
Germany 58.247 455
I created a function to calculate the ratio of deaths compared to the infections,…

Clem-Clem123
- 57
- 1
- 1
- 7
1
vote
2 answers
delete all lines starting by: INSERT INTO `mdl_logstore_standard_log` VALUES
I have a SQL text file on my Linux server, and I need to remove all lines starting by
INSERT INTO `mdl_logstore_standard_log`

saimmm0710
- 73
- 5
1
vote
1 answer
Reading a text file into a one dimensional array
I have been given the passenger list with passengers names, which represents the passengers currently waiting in the waiting room (which is an array).
Currently, I am struggling with some parts of step 1. The…
user13035194