8 Answered Questions for the topic file io

07/21/19

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

07/19/19

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 Python

05/29/19

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
File Io Linux Io Bash

05/17/19

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
File Io C Linux Unix

05/14/19

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

05/04/19

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

04/30/19

How to delete a file or folder in Python?

File Io Python

03/27/19

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?

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.