13 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for PriteshP23

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); …

Member Avatar for diafol
0
1K
Member Avatar for PriteshP23

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: > …

Member Avatar for PriteshP23
0
694
Member Avatar for kanoy83

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, …

Member Avatar for kanoy83
0
2K
Member Avatar for PhilEaton

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) …

Member Avatar for PhilEaton
0
412
Member Avatar for kaizokupuffball

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. …

Member Avatar for kaizokupuffball
0
266
Member Avatar for benjybob

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 …

Member Avatar for WaltP
0
214
Member Avatar for Insomaniacal

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] …

Member Avatar for jintujacob
0
236
Member Avatar for becka221

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 …

Member Avatar for vinitmittal2008
0
149
Member Avatar for ayesha789

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 …

Member Avatar for ayesha789
0
252
Member Avatar for george61

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", …

Member Avatar for prvnkmr449
0
3K
Member Avatar for Metalteeth9

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 …

Member Avatar for jonsca
0
155
Member Avatar for Sandhya212

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 …

Member Avatar for Sandhya212
0
217
Member Avatar for nccsbim071

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 …

Member Avatar for nccsbim071
0
152

The End.