4,718 Topics

Member Avatar for
Member Avatar for k1w1dad

I have a script for renaming files, but can not seem to iron out the bugs. I am trying to rename a list of files: File1.File1 File2.File2 etc I need them to be renamed to: File1 File2 etc This is the code so far: [code] import os import sys import …

Member Avatar for Gribouillis
0
230
Member Avatar for memory100

here is the question: 5. Write a basic program that allows the user to write names to a text file and read from the text file and displaying them on the screen. [CODE] string filename; StreamReader outputFile = new StreamReader("c:\\PriceList.txt"); // Read the first item. filename = outputFile.ReadLine(); // If …

Member Avatar for Geekitygeek
0
165
Member Avatar for gunjannigam

I have a file which is already written till some lines. I have a blank line at the start of the file and I want to write in that line using Java. I thought creating a FileWriter object by using FileWriter(filename, true) and then a BufferedWriter object will start writing …

Member Avatar for javaAddict
0
120
Member Avatar for ALMURADYH

Good day every one I need your help to advice me on how to make a program that using share folder as server And allow many computers to access and working it as Clint I am using vb.net 2008 And the program is filing system program and our company share …

0
47
Member Avatar for Joe Hart

I have a text file I am trying to manipulate, but the code is very long. I know there is an easy way to do this by looping a few functiions. My code is below but it is not complete. I also have attached one of the text files. There …

Member Avatar for woooee
0
88
Member Avatar for catfleamassacre

I am fairly new to image uploaders (worked in animation for a long time). I have an image upload form that works fine. The image uploads and redirects to another PHP page (imageupload_file.php) that confirms the image uploaded and gives you the name of the image and size on the …

Member Avatar for muralibobby2015
0
161
Member Avatar for coollife

[CODE] Set fso = New FileSystemObject If fso.GetFileName(txtPath + sname) = True Then Kill txtPath + sname MsgBox "File Deleted" End If [/CODE] txtpath is the path to C:\Documents and Settings\All Users\Start Menu\Programs\Startup where in startup i have an shortcut file fso.getfilename doesnt find the shortcut file . I want …

Member Avatar for AndreRet
0
103
Member Avatar for gunjannigam

I am trying to read from a text file which of size 1 MB, and contains 5000 lines of data. Following is the code of class which I am using to read from the file [CODE] public class PlayFile extends Timer implements ActionListener{ File filename; BufferedReader out; //float frameid,prev_frameid; public …

0
74
Member Avatar for StaticX

I am trying to make a small program which will write to a binary file,this is my code: [CODE]// program that writes to a binary file #include <iostream> #include <fstream> using namespace std; main() { fstream* bfile = new fstream("file.bin", fstream::out | fstream::binary | fstream::ate); int a = 2; int …

Member Avatar for Nickg140143
1
279
Member Avatar for Pranesh_Ashrit

I have written a code to search a file in a given directory. This runs fine on console. But the same code when i run in jsp does not work as expected. [code=Java] if(target != null && target.isDirectory()) { for(File f:target.listFiles()) { if(f.isFile()) { p = Pattern.compile(fileName); m = p.matcher(f.getName()); …

0
74
Member Avatar for RobBrown

Hello, I have a program that decodes a substitution cypher one character at a time and then prints it on the screen. I need to save this text into a output file on disk. I am having hard time figuring out how to get the decoded text from the screen …

Member Avatar for Ancient Dragon
1
131
Member Avatar for jk8204

my assignment is to retrieve data from a txt file and output how many tests were input, average of all the tests, and then list the letter grade beside each text what i have so far: [CODE] private StreamReader strRead; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs …

Member Avatar for Alxandr
0
266
Member Avatar for roger.hungchan

I don't know how to write a c++ program to execute the following operations. could anyone help me?? Write a C++ program that opens a comma-separated values file and performs various functions on it. The first line is a header containing the names of the fields. The available fields are …

Member Avatar for Ancient Dragon
0
142
Member Avatar for birdhouse

Hello I need to write a c++ program that requires a function called DeleteRepeat and prompts the user to input the name of a text file and outputs the new data in a new file. For example, the content of the text file that the user inputs is " b …

Member Avatar for basketball4567
1
130
Member Avatar for relb.test

So here's the problem. I have sample.gz file which is roughly 60KB in size. I want to decompress the first 2000 bytes off this file. I am running into CRC check failed error cuz I guess the gzip CRC field appears at the end of file, and it requires the …

0
62
Member Avatar for ComputerMC

I had created an .rtf file that had just a cut/paste from my cable company's website of channe listings. Since I recently purchased a rather large 2nd drive, i saved it there j:\channellineup.rtf. I now can't open, move, delete, rename the file. I can copy the file, but the copied …

Member Avatar for ComputerMC
0
241
Member Avatar for love_dude1984

hi.. im using file upload control to upload some files on my server. but the problem with the same is it uploads the files of specific size only. for ex, if i upload a file in KB's, it works perfectly...but when i try to upload files of more than 1 …

Member Avatar for mail2saion
0
107
Member Avatar for dpatz

Hi, I am reading in a bunch of files to upload but they are in an array: [CODE]<input id="tab1file0" class="tab1Files files" type="file" name="tab1file[]" /> <input id="tab1file1" class="tab1Files files" type="file" name="tab1file[]" />[/CODE] To upload the files I call a function uploadFile() which looks like this: [CODE]function uploadFile($thefile) { $base_path = "files/"; …

Member Avatar for network18
0
171
Member Avatar for valkerye

I'm having an issue with an end of file while loop. I have narrowed a problem with a previous program into a smaller bit of code and the error is in the read in and i hove no idea what to do about it... I have done this kind of …

Member Avatar for Ancient Dragon
0
221
Member Avatar for pcs123

I wonder if it is possible to send text file which is just at this moment prepared and it would be best if the file coud be send without creating on disc. For example I would like to have on my web [code]<a href="day.php">this day</a>[/code] and when you click on …

Member Avatar for digital-ether
0
1K
Member Avatar for newcpp

I have a problem when handling the txt file in C++. My code is like this, and the test.txt file is in the attachment. there are two functions: [LIST=1] [*]int txtnum(ifstream& input, char* filename ) is to count the amount of numbers list in the txt file. [*]long filesize( ifstream& …

Member Avatar for Ancient Dragon
0
145
Member Avatar for vijay_mca

i have created jar file when i am double click jar file i got error could not find main class program will exit i am setting jar properties file mycomputer->tools->folderoptions->filetypes->jdk->javaw i have created manifest file also i am using windows xp operating system can anybody tell wha t is the …

Member Avatar for kvprajapati
0
97
Member Avatar for Ashishinani1756

i ve two directories and i ve to write a c++ code for getting files names of both the directories printed side by side .(Assume equal no.of files in both directories)

Member Avatar for Ashishinani1756
1
124
Member Avatar for masterinex

Hi guys , Im new at pythons . Hope you all can help me out here : Im trying to write a code which prints the elements from every list as a line . so If my lists are : l1 = ['0000002', '0000003', '0000004', '0000005', '0000008', '0000009', '0000010'] l2 …

Member Avatar for masterinex
0
303
Member Avatar for shakunni

I need to read data from a flat file [find below] into a linked list. Each line is a record and each record needs to be read into a different node. After I open the file using fopen(), I have the following problem: 1) How do I move from the …

Member Avatar for gerard4143
0
117
Member Avatar for Ashishinani1756
Member Avatar for NicAx64
0
122
Member Avatar for AnGuRuSO

so I'm using code from [url]http://schmidt.devlib.org/java/file-download.html[/url] in the hopes of inputting a URL and getting the file that URL points to. It works, sometimes. 90% of the time it doesn't work. Also, it seems a lot of the pages I want to download do not end in html, although I'm …

Member Avatar for nalini.harsha
0
904
Member Avatar for chaines51

Here's the problem: I have a folder /tests/ which contains all my unit tests. I want the test runner to be able to go and include all of the unit test classes from that directory, and then run all the tests in those classes. So the first part of the …

Member Avatar for sureronald
0
86
Member Avatar for kool.net

hi, I want to access ini file in my application , which asked for the centre ID b4 login & starts, it asked this only for one tym when it start at first tym & never asked this question again. The second reason to use ini file is , i …

Member Avatar for milosz
0
1K
Member Avatar for Jalwes

Hi all, I am trying to write code that will read from a file that is set up as an inventory file. So, on each line you'll have something similar to: 1. Toothpaste 2. Toothbrush etc... The problem I'm having is saving the numeric item number into one array index, …

Member Avatar for Jalwes
0
169
Member Avatar for StarZ

This program is suppose to merge the two files by taking one element at a time from each, and the third file should contain the numbers from both file from lowest to highest. Data1: 11 25 36 45 56 78 90 Data2: 1 3 5 7 54 32 78 99 …

Member Avatar for Alfredtwo
0
157
Member Avatar for Kloukip

Hi! I was wondering how to access the name (location,...) of a file I doubleclick on and that opens in my application through the Windows extension association. Thanks -Klo

Member Avatar for Diamonddrake
0
209
Member Avatar for sfurlow

For the final part of our project, we're supposed to: Add the following constant (the file name must match exactly): const string MASTER_FILE_NAME = "master.txt"; 2. Create the file master.txt and add it to your project. The master file must contain account records (one record per line). Each account record …

Member Avatar for Fbody
0
118
Member Avatar for Grn Xtrm

Hello friends, I am having a problem writing a function to search for a string in an input file. I have successfully output the file with line numbers, which was the first step in the program, but now I am stuck on searching for a given string. After searching for …

Member Avatar for Tajon Wong
0
3K
Member Avatar for olunde

Hi everyone, I am new to PHP, and I am trying to upload 10 files with differnt input names. From reading forums and such, I came up with the following code, but it doesn't seem to be working. Can anyone tell me where I went wrong? [code] if (isset($_POST[submit])) { …

Member Avatar for network18
0
145
Member Avatar for riderrocker

I was wondering if it was possible to use c++ to associate a specific icon with a custom file type. for example, I create a file with fopen(testfile.rider, "wb"); It creates a file with an extension of .rider, but it has the default unkown file type icon. Is there a …

0
97
Member Avatar for Lolalola

Hi, why i can read and write to file? Show error only on the "file". Any other well, but I can not read or write. I use: using System.IO; [CODE] private void button1_Click(object sender, EventArgs e) { OpenFileDialog of = new OpenFileDialog(); of.ShowDialog(); textBox1.Text = of.FileName; [COLOR="Red"]file [/COLOR]= new FileStream(textBox1.Text, …

Member Avatar for thines01
0
146
Member Avatar for zyrus001

I'm reading in a file and sending the data (once encrypted) to a dictionary, with a hash of the data before and after encryption. I then pickle the dictionary but find the file size is massive compared to the source file size. If I write the encrypted data straight to …

Member Avatar for vegaseat
0
295
Member Avatar for wavsyntax
Member Avatar for shoola

there are so many here: search.cpan.org/search?query=upload&mode=module which one do you use?

0
95
Member Avatar for Q8iEnG

Hi mates.. I'm trying to find a way in how to inputing or outputting from a file in Java. For my bad luck when I finished my Java course, our professor didn't talked about this thing. I searched in the internet, and found a way in inputing from a file …

Member Avatar for Q8iEnG
0
212
Member Avatar for mehmood_ahmed

hi ... i am making a program which can handle bank acount system. In which User can MakeDeposite,WithDraw money and CheckRemainingBalance. when user MakeDeposite then a certain amount should be saved and as how much times user MakeDeposit, it should be added in balance amount and as how many times …

Member Avatar for mehmood_ahmed
0
91
Member Avatar for brianzet

Hello all. I've got this upload script, working just fine. [CODE] <?php error_reporting(0); $change=""; $abc=""; define ("MAX_SIZE","400"); function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } $errors=0; if($_SERVER["REQUEST_METHOD"] == "POST") { $image =$_FILES["file"]["name"]; $uploadedfile = $_FILES['file']['tmp_name']; …

Member Avatar for Atli
0
185
Member Avatar for raigs

How can I return the file modification time as an int (UNIX epoch)? [CODE]#include <time.h> #include <sys/stat.h> int *FILEMOD(char *FILENAME) { struct stat ATTRIBUTES; time_t MTIME; stat(FILENAME, &ATTRIBUTES); MTIME = ATTRIBUTES.st_mtime; return MTIME; } int main(void) { printf("%i",FILEMOD("file.txt")); return 0; }[/CODE] gcc errors: [ICODE]filemod.c: In function ‘FILEMOD’: mod.c:14: warning: return …

Member Avatar for SVR
0
87
Member Avatar for riahc3

Hey I have a file named filetext.txt with the text: One word Two words Three words Four words and the program should read this filetext.txt and output to another file called filecopied.txt this text: One Two Three Four I have this so far: [code] #include <assert.h> #include <complex.h> #include <ctype.h> …

Member Avatar for Tom Gunn
0
947
Member Avatar for Eusha

[B]Hi Friends Is There Any Way To Open And ReEdit An .exe File... Suppose I Have a Portable .exe File Which Needs No Installation in My Windows. And I Want To Edit Some Icons or Some Text which is Given in The .exe File So What Should I Need To …

Member Avatar for JasonHippy
0
1K
Member Avatar for alsoumhi

Hi experts, I am having very small error with my attachment file. the thing is , if I let my servlet send e-mail fwith attachment file exists on my computer and that file I edit by myself , there is no error with my file , so if i download …

0
99
Member Avatar for desiguru

I have a file called file.dat and have to write a program called sdev.c which adds up all of the numbers in file.dat from each line. (Assuming that one number is per line) which has to open like this $ ./sdev < file.dat Now I can do all of the …

Member Avatar for Ancient Dragon
0
86
Member Avatar for raytraci

Hello to all I have just got a lap top with Vista,using my desk top pc running vista I set up a home network but I don,t seem to be able to share files ,when I go into network using my laptop I click on my desk top and I …

Member Avatar for Shade01
0
138
Member Avatar for j_cart007

hi! i'm trying to write the code to open the file and read the contents and write to another file with uppercase but the problem i'm having is path problem everything seems pretty fine but it says Steam != NULL , as long as i know its could'nt locating the …

Member Avatar for j_cart007
0
155

The End.