Hi ,all in this code ,i read filename in package filename using path ,,now i want to read the file B.java that also exist in package filename and relationship between them is inhretance.. "extends" keyword. in this (public class filename extends B ), but not write B.java in path ,i want to read any file after extends keyword in program filename. can anyone help me. i mean i want to read any file.java that come after extends keyword. public class CyclomaticComplexity{ public static void main(String[] args) { try { fileName = "C:\\NetBeansProjects\\filename\\src\\filename\\filename.java"); FileReader fr = new FileReader(fileName); BufferedReader br = …

Member Avatar
Member Avatar
+0 forum 18

Hi guys, I have a number of files within a directory which are named Log-2014-01-21.txt and similar. What I’m trying to do is write a program that will archive these files based on the month that is in the file name rather than the file Info. The part I’m struggling with is getting the date out of the string which will work for different string lengths i.e if the file was called error-log-2014-11-11.txt. Is there a nice way of doing a string spilt to accomplish this, or another method? Kind Regards

Member Avatar
Member Avatar
+0 forum 3

Im working on a project where i have to get the number of printers that are allocated to a certain job and need to split the file name up so that i can read the type and the number of printers and if its a half bed or not. The file name will look something similar to this <name>_P<AQT or INI>_B<0-9>[h - for half beds] but would be like 20140702_PAQT_B6h and im wanting the _P and the _B part of it.

Member Avatar
Member Avatar
+0 forum 6

Hi everyone, I have to write a function that will dig into a folder and store all the filenames into an array. I will have to use that Array later to access to each of the file. My function worked, and when i tried to output onto the screen, the result was correct. However, after the function, all the Array members had the value of the final image in the folder Here is my code [CODE]struct FolderFile { char* name; }; FolderFile fileName[1000]; int numberFile = 0; void listFile() { DIR *pDIR; struct dirent *entry; char directoryName[261]; strcpy_s(directoryName,"ImageLibrary/"); if( pDIR=opendir(directoryName) …

Member Avatar
Member Avatar
+0 forum 4

Hello, I have csv filename with date. Everyday i have same csv file with respective date. I need to read filename (*everyday date changes in filename*) and do operation. For example, I have file "**cells_20140106_165532.csv**". I did like this to read it in general: $filename = "cells_".date('Ymd_hmi').".csv"; $file_contents = file_get_contents($filename); $importcsvsql = ""; `//error: cells_20140114_110109.csv` It is taking current date instead of filename's date. It is generating empty file "*cells_20140114_110109.csv*" Thanks in advanced.

Member Avatar
Member Avatar
+0 forum 8

Hello, I have one "**tar.Z**" file. Objective is to unzip it by shell script and check the date. * archive: filename_20140103_1540.tar.Z #!/bin/bash cd $REP_DATAS/path u=$(date +%u) if [ ${u} -eq 1 ] ; then dateQ=`date --date='-3 day' +'%Y%m%d_%H%m'` else dateQ=`date --date='-1 day' +'%Y%m%d_%H%m'` fi tar xvf filename_"dateQ".tar.Z > error: > > tar: Error is not recoverable: exiting now THANKS IN ADVANCED.

Member Avatar
Member Avatar
+0 forum 14

// Create the cboSelectGroup, and add it to the navigation panel: //String[] strDefaults = {"Defaults"}; //cboSelectGroup = new JComboBox(strDefaults);Public Class Form1 cboSelectGroup.setPreferredSize(new Dimension(150, 40)); cboSelectGroup.setMinimumSize(new Dimension(150, 40)); cboSelectGroup.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnImagesActionPerformed(evt); } });

Member Avatar
Member Avatar
+0 forum 2

hi guys, am testing this script, but its not working. my requirements: current file in database and in folder is 135.docx, and if i want to update it by uploading a new file, the new filename should be 135_1.docx , if update again it must be 135_2.docx and so on, the word file will just keep adding up in the folder but the database will just update its row data. $infile = 135.docx if ($pos = strrpos($infile, '.')) { $name = substr($infile, 0, $pos); $ext = substr($infile, $pos); } else { $name = $infile; } $testname = $name.$ext; //$newpath = …

Member Avatar
Member Avatar
+0 forum 15

I am trying to read XML file and store in sql table. I got two errors. PHP Warning: XMLReader::open(): Unable to open source data Warning: XMLReader::read(): Load Data before trying to read // In addition, Please let me know the filename in below cases. case 1: Code: Select all $reader->open($topdir."/nap/".$code->no()."_city.xml"); // IF i run like php user.php 01 || php user.php case 2: Code: Select all $reader->open($topdir."/nap/"."01_city.xml"); // IF i run like php user.php 01 || php user.php I would like to know the working process. How to solve it ?

Member Avatar
+0 forum 0

I've got this htacces code RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html I can load html files without the extension (test.html becomes test) but a php file in the same directory gives a 404 error when I try and do the same. Why is is it doing this?

Member Avatar
Member Avatar
+0 forum 16

I'm trying to search on how to store the image in a local folder and save its path and filename in ms access using vb.net but a lot of topic makes it more confusing for me. I'm just a student and working on my baby thesis. I'm currently building an employee's record and salary statement system where all values in registration form will be save in my database(ms access) including picture of the employee but i don't know how to start. Can anyone help me with my problem? I'm using vs 2005 with ms access 2003. Thanx in advance :)

Member Avatar
Member Avatar
+0 forum 2

Hello! I am having trouble getting the abspath when entering only an executable file. How can I fix this to return the full abspath? I am taking user input and opening a process (application). Here is my code: file = "/" + arr[2] + ".exe" print(file) path = os.path.abspath(file) print(path) subprocess.Popen(path) localtime = time.asctime(time.localtime(time.time())) print(arr[2] + " opened at " + localtime + "\n") When args[2] = 'firefox', this is outputted: firefox.exe C:\firefox.exe Traceback (most recent call last): File "C:\Python33\lib\subprocess.py", line 1090, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified Any suggestions? Thanks!

Member Avatar
Member Avatar
+0 forum 2

I am trying to do the following in excel 2010: For instance: If I have a directory file name "Brazilian Navy Ku" and then I have another directory file folder name " Brazilian Aeronautical VSAT Spares"; then it will go through the first directory file folder name, search for excel files, open the excel file, search for any worksheet tab with tab format XX.XXX or tab format XX.XXX.XX, then retrieve information from certain cells within that excel file. I just need to be able to have it search within a folder by a certain name criteria of the folder name. …

Member Avatar
Member Avatar
+0 forum 1

When you are attaching a file to thread don't use # for a file name it will give 404 not found page. [Example](http://www.daniweb.com/software-development/csharp/threads/425890/problem-connecting-c-app-to-a-.mdf-file-in-sql-management-studio)

Member Avatar
Member Avatar
+1 forum 2

Hi! Im pretty new to this whole thing with PHP and have looked at some examples to learn it. I currently made a site that for now, runs on WAMP localy. The thing is, i was wondering if this would be a good code to use on the upload.php site. I get this error when trying to upload a big image file. It says the filename can not be empty at line 85. I would appreciate it if anyone had time to look at this for me. [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" …

Member Avatar
Member Avatar
+0 forum 2

Hi there. I'm writing a simple system to order certain data. Now this is the deal: I have a bunch of files with the following filename structures (stored as strings): 0000[i]_FILENAME.EXT i represents a random number. Now I want to scan whether the file has that structure, and if it has that structure, it should rename it to FILENAME.EXT. So basically, I want to program to check whether a certain structure is present in the filename, and if so, it should rename the string. Any ideas how on how to solve this problem? Thanks in advance! Eddy Wally

Member Avatar
Member Avatar
+0 forum 2

Hey very simple problem. I've been searching the site to see if I did anything wrong and I had to fail because I still get the wrong results (semantic error). Problem #1: Every time I use fopen with the "w" (or write) mode the file with whatever name given is not created which brings us to the second problem. Problem #2: Correct me if I am wrong (syntax might of changed due to updates), but as I know according to Dave Mark's "Learn C on the Mac" he specifies as filename paths as the following: All of the following are …

Member Avatar
Member Avatar
+0 forum 3

I have a file with the following path :[code] D:/bar/クレイジー・ヒッツ!/foo.abc[/code] I am parsing the path from a XML file and storing it in a variable called "path" in the form of "file://localhost/D:/bar/クレイジー・ヒッツ!/foo.abc" Then, the following operations are being done : [code] path=path[17:] #to remove the file://localhost/ part from the path path=urllib.url2pathname(path) path=path.decode('utf8') '''to properly encode the path in case it has non-english characters''' [/code] Now, when I run this code, I get the following error [code] IOError: [Errno 2] No such file or directory: u'D:\\Music\\Pink Floyd\\The Wall Disc 1\\5 - Another Brick in the Wall, Pt. 2.mp3' [/code] I am …

Member Avatar
Member Avatar
+0 forum 1

Hi. I wasbwondering if there was a way to have the user input something to a string and then write that as the filename. Please use my example of the string deckname.

Member Avatar
Member Avatar
+0 forum 13

Hello there, im writing code for my asteroids game and am nearly finished but ive come across a problem when trying to load the file the save game is written like this and works perfectly fine, it saves the things i want to a text file: [CODE]void WrapGame::save() { cout<<"enter the filename (Max 20 characters)"<<endl; cin>>Filename; ofstream saveGame(Filename, ios::out); saveGame<<gameState<<"\n"<<score<<"\n"<<health<<"\n"<<lives; saveGame.close(); }[/CODE] The load game function however throws me a red line under the first >> after savegame on the last line of the function is called [CODE]void WrapGame::load() { cout<<"Enter the name of the file you wish to load:"<<endl; …

Member Avatar
Member Avatar
+0 forum 4

Hi everyone. I'm having a little bit of trouble getting a piece of code to work correctly here. Here is the code. [CODE]] filename = "./" + `random.randrange(0,9999999999999999999999999999999999)` + ".txt" f = open(filename, 'w') f.write(`data`) f.close f = open(filename,'rb') ftp = FTP('ftphost.com') time.sleep(5) ftp.login('user,pass') time.sleep(5) ftp.storbinary('STOR `filename`', f ) [/CODE] Everything works as it is supposed to. The variable "filename" is saved in the current directory with the randomly generated name. When the ftp.storbinary command runs, it uploads the information in the file correctly, however, it always saves it with the name, `filename`. This causes it to overwrite itself each …

Member Avatar
Member Avatar
+0 forum 4

Hi, Im guessing this is an easy piece of code, but i cant find the answer Im looking for anywhere. I have 20 files each with a different a list of numbers (not all the same amount of numbers). Each file is called data-01.txt, data-02.txt... to data-20.txt.I need to open each file, do the same calculation on each file and print out all the results. I was looking for a way to open each file by using a variable(i=1; i<=20; i++) rather than type in each, but can't seem to find one. Any help please?

Member Avatar
Member Avatar
+0 forum 10

Hi I have to develop a code for file configuration in PHP. My basic text file is stored in C:\abc my text file name format is Mobile#_Code.request Example: 923135470808_9033.request Now I want to read code 9033 from the name of text file which always be there after _ and before .request After getting code I will get data from MySQL DB and want to put this result in the form of message in the text file like "Hi 9033 your remaining balance is 50USD" Now after putting message in same file I want to rename the file name as 923135470808_9033.done …

Member Avatar
Member Avatar
+0 forum 5

Does anyone know what the *.!11 extension is? I'm getting hundreds (over 1100 an hour ago) of files with numeric filenames and the !11 extension. I opened it with notepad++ and mostly it was code, but "Sketchpad" was in the text. I have no such application, so far as I know.

Member Avatar
+0 forum 0

Ok I have a linked list which have to read from binary file and to write in binary files. This is the function about the reading from keyboard: [CODE]short readElement( Node * newE) { int b,e,m; if ( newE == NULL ) return 1; do { printf("\n Registration number:"); scanf("%s", &newE->regnomer); printf("\n Brand:"); scanf("%s", &newE->marka); printf("\n Year:"); b = scanf("%d", &newE->godina ); printf("\n Kilometres:"); e = scanf("%d", &newE->kilometri ); printf("\n Passengers:"); m = scanf("%d", &newE->mesta ); fflush(stdin); if ( b == EOF ) return 1; if(dostovernost(newE)) printf("\nWrong input!"); } while(dostovernost(newE)); writebinary(newE,fout); return 0; }[/CODE] writebinary is the function about writing …

Member Avatar
Member Avatar
+0 forum 2

Hey guys and girls, I am extremely new to coding, and I would appreciate some help. I am trying to write a code in which someone inputs a number, which is part of a file name, then I do stuff with the filename. Here is the part that I am having problems with... [CODE] void histogen() double x; // Get the run file cout << "Which run number?" << endl; cin >> x; TFile y ("AMBER/data/runx/amhsk_runx.root"); [/CODE] Don't worry about the TFile command if you don't know it (you might, but if you don't, don't worry, it's not the problem), …

Member Avatar
Member Avatar
+0 forum 8

Hi, I would need to create unique filenames appended by the iteration number. For eg. [CODE]for( i=0;i<iterations;i++){ ofstream outfile("iterfile"+"i"); // i.e filename should be iterfile0 for 1st iteration. } [/CODE] I need to cast "i" from int to char so I tried [CODE]ofstream outfile("iterfile"+(char)i)[/CODE] but it did not work. How do I do this correctly?

Member Avatar
Member Avatar
+0 forum 6

A short look at creating lists of file names or full path names using the versatile Python module glob. Glob follows the standard wildcard protocol.

Member Avatar
+1 forum 0

Hi I am developing FTP Clinet application that downloads files from the specified server i sent the LIST command and server returned a list of file names in following order: -rw-r--r-- 1 devubas devubas 24 Sep 5 2008 .bash_logout now the problem is how do i extract the filename fom above string for example just the .bash_logout. Is there any way to just get the filename from FTP server by sending this command combined with other parameters. Please help

Member Avatar
Member Avatar
+0 forum 3

please help me in making a code on how to get the filename, application in a client is using. i need the code in visual basic 6.0. please help me. T_T asap[code]please help me in making a code on how to get the filename, application in a client is using. i need the code in visual basic 6.0. please help me. T_T asap[/code]

Member Avatar
Member Avatar
+0 forum 2

The End.