9 Answered Questions for the topic file io
Creating file with QB64?
With the following DIM a AS INTEGER a = 10 OPEN "myFile" FOR BINARY AS #1 PUT #1, 1, a CLOSE #1 I get a file (myFile) with two bytes (using QB64). The first byte is indeed `0A`, but... more
CreateTextFile Method is basic fails to create file at specified path?
I am using BASIC for the first time to automate a LeCroy Oscilloscope. Following examples provided by them I am attempting to create a program which uses the oscilloscope features and prints... more
File Io Ruby
How to write to file in Ruby?
I need to read the data out of database and then save it in a text file.How can I do that in Ruby? Is there any file management system in Ruby?
Correct way to write line to file?
I'm used to doing `print >>f, "hi there"`However, it seems that `print >>` is getting deprecated. What is the recommended way to do the line above?Update:Regarding all those answers... more
How to redirect output to a file and stdout?
In bash, calling `foo` would display any output from that command on the stdout. Calling `foo > output` would redirect any output from that command to the file specified (in this case... more
C fopen vs open?
Is there any reason (other than syntactic ones) that you'd want to use FILE *fdopen(int fd, const char *mode);or FILE *fopen(const char *path, const char *mode);instead of int open(const... more
open() in Python does not create a file if it doesn't exist?
What is the best way to open a file as read/write if it exists, or if it does not, then create it and open it as read/write? From what I read, `file = open('myfile.dat', 'rw')` should do this,... more
Find all files in a directory with extension .txt in Python?
How can I find all the files in a directory having the extension `.txt` in python?