Search Results

Search found 72319 results on 2893 pages for 'file explorer'.

Page 111/2893 | < Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >

  • How to append text into text file dynamically

    - by niraj deshmukh
    [12] key1=val1 key2=val2 key3=val3 key4=val4 key5=val5 [13] key1=val1 key2=val2 key3=val3 key4=val4 key5=xyz [14] key1=val1 key2=val2 key3=val3 key4=val4 key5=val5 I want to update key5=val5 where [13]. try { br = new BufferedReader(new FileReader(oldFileName)); bw = new BufferedWriter(new FileWriter(tmpFileName)); String line; while ((line = br.readLine()) != null) { System.out.println(line); if (line.contains("[13]")) { while (line.contains("key5")) { if (line.contains("key5")) { line = line.replace("key5", "key5= Val5"); bw.write(line+"\n"); } } } } } catch (Exception e) { return; } finally { try { if(br != null) br.close(); } catch (IOException e) { // } try { if(bw != null) bw.close(); } catch (IOException e) { // } }

    Read the article

  • Explain please download file iphone

    - by Floo
    hi all ! i want to download plist from my server usibg http:// i have searched the web and everybody says use that class or that one ... but no example on how to do this. may be it is really simple but i'm a noob so if someone can explain or give a link he'll be my heroe thanks to all !!!

    Read the article

  • copy file into another file in prolog

    - by smile
    Good morning/evening how can I write something in a file and then copy its content into the current file? for example I consult file1.pro then I have rule write something in file2.pro , after this rule finish its job I want append the content of the file2.pro int file1.pro . when I tried to append into file1.pro directly , the data appear like undefined symbols ,I don't know why please hellp me thank you.

    Read the article

  • Windows batch file timing bug

    - by elbillaf
    I've used %time% for timing previously - at least I think I have. I have this weird IF NOT "%1" == "" ( echo Testing: %1 echo Start: %time% sqlcmd -S MYSERVER -i test_import_%1.sql -o "test_%1%.log" sleep 3 echo End: %time% ) I run this, and it prints: Testing: pm Start: 13:29:45.30 End: 13:29:45.30 In this case, my sql code is failing (different reason), but I figure the sleep 3 should make the time increment by 3 at least. Any ideas? tx, tff

    Read the article

  • Bash: how to process variables from an input file?

    - by gilgongo
    I've got a bash script that reads input from a file like this: while IFS="|" read -r a b do echo "$a something $b somethingelse" done < "$FILE" The file it reads looketh like this: http://someurl1.com|label1 http://someurl2.com|label2 However, I'd like to be able to insert the names of variables into that file when it suits me, and have the script process them when it sees them, so the file might look like this: http://someurl1.com?$VAR|label1 http://someurl2.com|label2 So $VAR could be, for example, today's date, producing an output like this: http://someurl1.com something label1 somethingelse http://someurl2.com?20100320 something label2 somethingelse

    Read the article

  • Determining whether a file is a duplicate

    - by Todd R
    Is there a reliable way to determine whether or not two files are the same? For example, two files with the same size and type may or may not be the same binarilly (yeah, I know it's not really a word). I assume that comparing one or two checksums of the files will help, but I wonder: How reliable are checksums at determining whether two files are different; what are the chances of two different files having the same checksum? Would reliability increase by applying additional checksum comparisons? Which checksum algorithm(s) would be the most efficient and/or reliable? Any ideas, suggestions or thoughts are appreciated! P.S. The code for this is being written in Java running on a nix system, but generic or platform agnostic input is most helpful.

    Read the article

  • Count the number of lines in a file with Ruby, without reading entire file into memory

    - by smnirven
    I'm processing huge data files (millions of lines each). Before I start processing I'd like to get a count of the number of lines in the file, so I can then indicate how far along the processing is. I am using Ruby, and because of the size of the files, it would not be practical to read the entire file into memory just to count how many lines there are. Does anyone have a good suggestion on how to do this?

    Read the article

  • Adding file names to an array list in java

    - by Chris G
    Hi I am currently needing to load the contents of a folders filenames to an arraylist I have but I am unsure as how to do this. To put it into perspective I have a folder with One.txt, Two.txt, Three.txt etc. I want to be able to load this list into an arraylist so that if I was to check the arraylist its contents would be : arraylist[0] = One arraylist[1] = Two arraylist[3] = Three If anyone could give me any insight into this it would be much appreciated.

    Read the article

  • In Windows 8.1, how can I configure File History to backup *some* of my SkyDrive folders?

    - by Matthew
    I want File History to back up all of the folders in my SkyDrive except for the media folders (Music, Pictures, Videos, Podcasts). My media folders are "available online only", the rest of "available offline". Right now File History does not back up any of the content in my SkyDrive, and I can't seem to find a way to configure which folders it backs up. I found some sources that say if my SkyDrive is available offline, it will be added to File History. But I don't want to make my entire SkyDrive available offline, just the non-media folders.

    Read the article

  • Is there any way to notify IE about changes done in registry via code?

    - by Mayur M
    Hi, I have done changes in registry (proxy settings) via Windows programming code. I have to restart (reopen) Internet Explorer each time I run the code to make those changes take effect. Is there any API in Windows programming through which I can notify Internet Explorer or Windows that changes are made to the registry and there will not be any need to reopen Internet Explorer to make those changes take effect? Thanks.

    Read the article

  • Use of bit-torrent for large file download as an alternative to FTP

    - by questzen
    The company I work for procures large volumes of data and does this by subscribing to FTP locations. I was wondering if it is possible to download the same using a tracker, the major challenge is authentication of the users IMO. Most ftp servers we subscribe to have a restriction of the number of ftp connection attempts. Does any one here have any experience with this? Any advice is welcome. Edit To clarify, we subscribe to third party vendors and access their ftp location using credentials provided by them. The service is not exclusive to us, they do sell their data to several others. If we could be part of the swarm, the download rates would be pretty high without added penalty. The question is about the possibility of achieving this, so that we can put-forth a proposal in those lines. The vendors obviously wouldn't share data to non-subscribers, so that is a constraint.

    Read the article

  • Java: Inputting text from a file using split

    - by 00PS
    I am inputting an adjacency list for a graph. There are three columns of data (vertex, destination, edge) separated by a single space. Here is my implementation so far: FileStream in = new FileStream("input1.txt"); Scanner s = new Scanner(in); String buffer; String [] line = null; while (s.hasNext()) { buffer = s.nextLine(); line = buffer.split("\\s+"); g.add(line[0]); System.out.println("Added vertex " + line[0] + "."); g.addEdge(line[0], line[1], Integer.parseInt(line[2])); System.out.println("Added edge from " + line[0] + " to " + line[1] + " with a weight of " + Integer.parseInt(line[2]) + "."); } System.out.println("Size of graph = " + g.size()); Here is the output: Added vertex a. Added edge from a to b with a weight of 9. Exception in thread "main" java.lang.NullPointerException at structure5.GraphListDirected.addEdge(GraphListDirected.java:93) at Driver.main(Driver.java:28) I was under the impression that line = buffer.split("\\s+"); would return a 2 dimensional array of Strings to the variable line. It seemed to work the first time but not the second. Any thoughts? I would also like some feedback on my implementation of this problem. Is there a better way? Anything to help out a novice! :)

    Read the article

  • Windows batch file: Pipe destroys my return code

    - by murxx
    Hi, is it possible to return the errorlevel also if I pipe the output of a script into a logfile: test1.bat: call test2.bat 2>&1 | tee log.txt echo ERRORLEVEL: %ERRORLEVEL% test2.bat: exit /B 1 Output when calling test1.bat: ERRORLEVEL: 0 The errorlevel is always 0. The problem is, I want to call another script inside my script where the output should be redirected synchronously with the output shown in the command line, therefore a simple is not enough for me. I tried several ideas, but result is that the pipe always seems to destroy the given error-level... :( Can you give me any further suggestions? Thanks in advance... :)

    Read the article

< Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >