Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read
Q&A

Posts tagged file-handling

For questions about general file actions such as creating, opening, closing, reading, updating, writing, comparing or deleting files.

This tag doesn't have a detailed wiki yet.

66%
+2 −0
Q&A Using Lua's `os.rename` to rename a file from a hard drive to a new location on a USB flash drive

I'm using the os.rename function in a lua script. It works perfectly fine for renaming files on my hard drive, e.g. os.rename("test.txt","/Users/username/Desktop/test2.txt") will rename the fil...

1 answer  ·  posted 2mo ago by samcarter‭  ·  last activity 2mo ago by Peter Taylor‭

33%
+1 −4
Q&A How can I modify the code above to accept string as user input and use strcmp to compare with the contents of the text file & then delete that line?

I want to enter a string to compare with the text file, and if that word matches, then I want to delete that line containing that string. How can I modify the code below, since the code below take...

1 answer  ·  posted 12mo ago by dumplings‭  ·  edited 5mo ago by Alexei‭

Question c file-handling
55%
+3 −2
Q&A Why does fopen return NULL?

#include&lt;stdio.h&gt; #include&lt;stdlib.h&gt; int main (void){ FILE *cfPtr; char name[15]; int ID; if ((cfPtr = fopen("draft.txt","w")) == NULL){ printf("File could n...

2 answers  ·  posted 12mo ago by dumplings‭  ·  edited 5mo ago by dumplings‭

71%
+3 −0
Q&A Transferring files from a legacy project to an existing one as varbinary

Our team is currently transferring all functionality (+ some changes) from small and very old project A (almost code freeze) to project B (actively developed). As part of the data migration, there ...

1 answer  ·  posted 11mo ago by Alexei‭  ·  last activity 11mo ago by Derek Elkins‭

81%
+7 −0
Q&A Open file in script's own folder

I have a Python script that needs to access some data (or configuration) file in its very own folder. For example, say script.py does something like this: with open('data.txt') as file: data ...

1 answer  ·  posted 12mo ago by J-hen‭  ·  edited 12mo ago by Alexei‭

75%
+4 −0
Q&A How to clear the contents of a file?

How to clear the contents of a file using C?

1 answer  ·  posted 12mo ago by dumplings‭  ·  edited 12mo ago by hkotsubo‭

Question c file-handling

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!

Like what we're doing? Support us! Donate