473,699 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to update a file

Hi friends,
i have one doubt, that how can we update a file without using a
temporary file in C.
i need to do it in my program.
If there is any way to do so then please let me know the procedure.

Thanks N regards
Subu

Apr 11 '06 #1
2 1852
Subhashini wrote:
i have one doubt, that how can we update a file without using a
temporary file in C.
i need to do it in my program.
If there is any way to do so then please let me know the procedure.


You can do it with fopen() (and fseek()).
Look them up in your reference manual.

--
If you're posting through Google read <http://cfaj.freeshell. org/google>
Apr 11 '06 #2
Subhashini wrote:
Hi friends,
i have one doubt, that how can we update a file without using a
temporary file in C.
i need to do it in my program.
If there is any way to do so then please let me know the procedure.


We don't have enough information to answer your question. What is the
format of the file? What do you mean by "update"? Are you adding
something? Deleting something? Replacing? Why don't you want a
temporary?

Give a full problem description, not a vague question. There's a good
chance the answer is, "you can't", but we might be able to come up with
something if we know exactly what you are trying to do.

Brian
--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
Apr 11 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1815
by: Michael Reynolds | last post by:
I can read file attributes just fine (author, title, etc,) But there's no way to update them. I know windows application can do it, but can a web application update these files? Here's the code I'm using: Dim oSummProps As DSOFile.SummaryProperties Dim oCustProp As DSOFile.CustomProperty
5
17953
by: anas.hashmi | last post by:
I am trying to write to the beginning of a file. The reason: I want to make a form where board webmasters can use it to insert in updates to a webpage without having to go directly into the web file and start editing. The form must write to the beginning of the file so that the update appears on the top of the file instead. I was actually writing in PHP but see that they do not support it. So I turned to C++. On About.com, the...
2
2278
by: Arjen | last post by:
Hi, Can someone help me to update my XML file? This is what I have. XmlDoc.Load(MapPath("~/myFile.xml")); XmlNodeList oXmlUser = oXmlDoc.GetElementsByTagName("user"); foreach (XmlNode user in oXmlUser) { // if user found, update and save/update file
1
1565
by: EAI | last post by:
Hi All, I have a requirement to update first 200 bytes of a huge file. I know this can be done in a couple of ways. But all of those require a lot of processing. What would be the efficient way to do this? Thank you.
0
964
by: Dmitry Teslenko | last post by:
Hello! I use some script in python 2.5 from vim editor (it has python bindings) that updates some file and then launches another program (ms visual studio, for example) to do something with updated file. I faced problem when updated file is locked for writing until vim editor is closed. launch vim -update file -launch msvc -file locked launch vim -update file -launch msvc -close vim -file locked
0
1508
by: Gabriel Genellina | last post by:
En Tue, 13 May 2008 11:57:03 -0300, Dmitry Teslenko <dteslenko@gmail.com> escribió: Is the code above contained in a function? So all references are released upon function exit? If not, you could try using: del input, output, filter That should release all remaining references to the output file, I presume. Or locate the inner reference to the output file (filter.something perhaps?) and explicitely close it.
5
1691
by: CSharper | last post by:
I have a data file which is 2.1GB (zipped), when the exe runs, it copies the content of the zip file to a destination folder. What is the best way to achive this? Current implementation is to zip the file at the source and at the destination unzip the file and if the file dates are different then copy the files over. Is there a better way to do this other than zipping and unzipping? Thanks.
4
6305
ddtpmyra
by: ddtpmyra | last post by:
Im having trouble on updating the file inside mysql database using the php. Should I use <form> or im wrong on how I called the variable from previous page? FORM 1 - that accepts the file pointer to upload. # Get the ID $id = $_GET; ..... echo "<p>Replace CMR Document: <input type=\"file\" name=\"uploaded_file\" size=\"43\">"; echo "<a href='replaceCMR.php?id=$id}'>Replace";
7
1638
by: Jashua Cumbie | last post by:
I have recently imported some data to SQL for a client, using files provided by another company. We made edits in Excel, using different vlookups and concatenates, and have now realized that one field called ShortFileName is not correct. The table (File) with the incorrect ShortFileName data has other relational tables that point to it (People2File, Notes2File, etc), so we need to leave the data there, with the unique identifiers staying the...
1
2488
HaLo2FrEeEk
by: HaLo2FrEeEk | last post by:
I've written an update method for one of my programs and for the most part it works well, but there is a slight issue. The way I have it check for updates is to simply download an XML file from my server and check the major, minor, and revision numbers in the file against those of the application. So if my application version is 2.2.1 and the XML file says 2.2.2, then the program would know an update was available. Here is my code: if...
0
8689
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9035
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8916
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8885
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7752
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5875
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4376
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.