write

FileNotFound exception when trying to write to a file

OK, I'm feeling like this should be easy but am obviously missing something fundamental to file writing in Java. I have this: File someFile = new File("someDirA/someDirB/someDirC/filename.txt"); and I just want to write to the file. However, while someDirA exists, someDirB (and therefore someDirC and filename.txt) do not exist. Doi...

Writing to file VB6 without new line?

I have some strings I want to write to a file in VB6, I can write it fine but every time I do it adds a new line automatically after each write command. Is there a function or a way to just write to the file without the automatic new line? Thanks. ...

Shell script to name videos on device

I have a .sh script that automounts any usb device that is plugged in. I need it to also find if there are videos in a certain location on the device that is plugged in then write them to a videos.txt file. Here's what I have and its not working. Also I need it to put the mountpoint in the videos.txt file. ${MOUNTPOINT}$count is the path...

write() causes fatal crash when filedescriptor becomes invalid

I'm writing an iPhone App with a webserver in it. To handle a web request, I take the web request and write() to it the data that I want to send back. When I try to download a moderately sized file (3-6MB) it works fine, but if I cancel the download halfway through, the app crashes and leaves no trace of an error. I'm thinking that the ...

FPDF in PHP, setX just indents first row

I use FPDF to creat PDF from PHP and i have a problem with the Write() function i use the following code and i want to indent the text block not just the first row: $pdf->SetX(60); $pdf->Write(5,'' . str_repeat( ' This is a test of setX.', 30 )); but as you can understand it's just indents the first row, any idea on how to move the w...

Flex - How to edit a xml file on the server

Hi! I was wondering if it was possible to edit an xml on the server side from a web based flex application. When you use XML files in a Flex application and then compile it to upload it in the server, Flex Buidler generates a swf file with the xml data embedded. How should I do to have access to those XML files?? Thanks for your answ...

Writing a CSV file for Mac users with PHP

I use a generic algorithm to write CSV files that in theory works for the major OSes. However, the client started to use Mac a few weeks ago, and they keep telling me the CSV file cannot be read in Microsoft Excel 2008 for Mac 12.2.1. They have their OS configured to use "semicolon ;" as list separator, which is exactly what I am writin...

How to write to the OpenGL Depth Buffer

I'm trying to implement an old-school technique where a rendered background image AND preset depth information is used to occlude other objects in the scene. So for instance if you have a picture of a room with some wires hanging from the ceiling in the foreground, these are given a shallow depth value in the depthmap, and when rendered...

Best directory to store application data with read\write rights for all users?

Hi guys. Until Windows Vista I was saving my application data into the directory where the program was located. The most common place was "C:\Program Files\MyApplication". As we know, under Vista and later the common user does't have rights to write under "Program Files" folder. So my first idea was to save the application data under "A...

Write-access for c# app in its own exe dir in Windows 7

I know that user accounts in Windows 7 are limited by default, so a program cannot just write anywhere on the system (as it was possible in Win XP). But I thought that it would be possible that e.g. a c# app is allowed to write inside it's own exe-directory or it's subfolders at least (not everything is 'user settings' or should be writ...

write system call to file desciptor ZERO

int main ( ) { char C[] = "Hello World"; write(0,C,sizeof(C)); return 0; } In the above program, I am writing to File descriptor ZERO which I suppose by default is STDIN.. Then why I am I getting output at STDOUT? shadyabhi@shadyabhi-desktop:~$ ./a.out Hello Worldshadyabhi@shadyabhi-desktop:~$ ...

Recognizing file - Python

Ok, so the title may trick you a bit, and I'm sorry for that but didn't find a better title. This question might be a bit hard to understand so I'll try my best. I have no idea how this works or if it is even possible but what I want to do is for example create a file type (lets imagine .test (in which a random file name would be rando...

writing dynamic headers

I have a php dynamically generated image which I need to write to file to call later. My problem is that I need this image to have appropriate expiration headers included in it. There are a massive number of these and their headers vary individually file-by-file making .htaccess controls not an option. I can write expiration headers i...

write in file is not complete without quitting the IDLE(Python GUI)

I want to write something in a file. for example, fo=open('C:\\Python\\readline_test.txt','a') for i in range(3): st='abc'+'\n' fo.write(st) fo.close then I open this python file in IDLE, and click "Run Module". There is no error message but I find the writing is not complete if I didn't quit IDLE. How can I complete the file writin...

automating write conflict messages

is there any method to avoid the annoying write conflict messages by automating and hiding the process so that it doesn't appear as if the program is defective? there doesn't seem to be any point to these messages anyway as there is only one real choice which is to drop the changes. ...

iPhone: How to write plist array of dictionary object

Hello, I'm a young Italian developer for the iPhone. I have a plist file (named "Frase") with this structure: Root Array - Item 0 Dictionary Frase String Preferito Bool - Item 1 Dictionary Frase String Preferito Bool - Item 2 Dictionary Frase String ...

WordPress Write Cache Problem with Multiple Sessions

I'm working on a content dripper custom plugin in WordPress that my client asked me to build. He says he wants it to catch a page view event, and if it's the right time of day (24 hours since last post), to pull from a resource file and output another post. He needed it to also raise a flag and prevent other sessions from firing that sam...

Programs won't write to a file, and I do not know if it is reading it

This program is supposed to read files and write them. I took the file open checks out because they kept causing errors. The problem is that the files open like they are supposed to and the names are correct but nothing is on any of the text screens. Do you know what is wrong? #include<iostream> #include<fstream> #include<cstdlib> #incl...

read numbers from files in columns, one column whole numbers, other column numbers with decimals

int price=' '; // attempt to grab a decimal number - but not the correct way int itemnum=' '; // attempt to grab a whole number - but not the right way while((price== (price*1.00)) && (itemnum == (itemnum*1))) What is a way to get numbers in 2 diff columns where one column is whole numbers and the other are numbers with decimal plac...

how to write or create (when no exist) a file using python and Google AppEngine

this is my code: f = open('text/a.log', 'wb') f.write('hahaha') f.close() and it is not create a new file when not exist how to do this , thanks updated class MyThread(threading.Thread): def run(self): f = open('a.log', 'w') f.write('hahaha') f.close() error is : Traceback (most recent call last): ...