Thread: Writing to other files

  1. #16
    Registered User
    Join Date
    Apr 2009
    Location
    Russia
    Posts
    116
    Quote Originally Posted by Liz320
    I have a rather complex program where I need to pull in data from a website using loops, direct that data to an output file for calculations and then direct everything to another file for raw data which will then be used for a different program.
    It needs two parts, first part (program or the script) for the downloading a file and the program for the processing and saving

    for the first part you can use php (but you should read help for it because it has very many differences from C, so there is hard to get any character from a string because it is not an array of chars and so on)
    but it is flexible for the work with the web and can [ process+ ] save data to the file
    bash works only under linux (only in bash at any system, what it will use ? wget ? wget is not uniform too) and php can be both in linux and windows (for windows installation takes ten megabytes)

    then, when you have good data on your disk, you can apply main program to them
    so, if you use wget it can have sets, this sets can be changed by the user at any time and so ? your program will stop, because will not find the downloaded file (i.e. we need to make check for the setting of wget)

    Code:
    -r recursive
    you know it will save the pictures, ok do you want pictures ? no ? so you should include picture exclusion to the script, and .js and .css

    you can make only the tree from the file and then load it with processing
    Last edited by c.user; 05-20-2009 at 11:47 PM.

  2. #17
    Registered User
    Join Date
    May 2009
    Posts
    27
    Quote Originally Posted by c.user View Post
    It needs two parts, first part (program or the script) for the downloading a file and the program for the processing and saving

    for the first part you can use php (but you should read help for it because it has very many differences from C, so there is hard to get any character from a string because it is not an array of chars and so on)
    but it is flexible for the work with the web and can [ process+ ] save data to the file
    bash works only under linux (only in bash at any system, what it will use ? wget ? wget is not uniform too) and php can be both in linux and windows (for windows installation takes ten megabytes)

    then, when you have good data on your disk, you can apply main program to them
    so, if you use wget it can have sets, this sets can be changed by the user at any time and so ? your program will stop, because will not find the downloaded file (i.e. we need to make check for the setting of wget)

    Code:
    -r recursive
    you know it will save the pictures, ok do you want pictures ? no ? so you should include picture exclusion to the script, and .js and .css

    you can make only the tree from the file and then load it with processing

    Not sure I understand how php would work in my case. I'm using Linux, yes, and maybe this php can be applied somehow??? If I had more experience, I might be able to make the connection. But unless it's straight-forward, I don't know that I can learn something new at this stage. There are no pictures involved in this application. I'm really hoping to make something that won't eat up a lot of memory, will get me everything I need, and hopefully be in a useable form for when I go to analyze the data (I'll be using SPSS for the analysis, if anyone has heard of that. That I definitely know. )

    Thanks for taking the time to post and I am definitely open to any ideas (i.e., you all see options that I wouldn't know to consider). Unfortunately I haven't got much experience and I'm still hoping to master C.

  3. #18
    Registered User
    Join Date
    Apr 2009
    Location
    Russia
    Posts
    116
    this is example of flexibility

    it connects to the station to smtp read data and save them to the file with line numbering

    I have a script which processing only files on the disk (one form to another form), but there are comments in russian, it works normal too (and in linux and in windows)
    for the local work the C program would be better (it is more flexible than php)

    remove .txt extension from zip archive
    Last edited by c.user; 05-21-2009 at 08:48 PM.

  4. #19
    Registered User
    Join Date
    May 2009
    Posts
    27
    Quote Originally Posted by c.user View Post
    this is example of flexibility

    it connects to the station to smtp read data and save them to the file with line numbering

    I have a script which processing only files on the disk (one form to another form), but there are comments in russian, it works normal too (and in linux and in windows)
    for the local work the C program would be better (it is more flexible than php)

    remove .txt extension from zip archive

    This is a zip file, correct? I am opening it without unzipping, but definitely not sure what it means.

  5. #20
    Registered User
    Join Date
    Apr 2009
    Location
    Russia
    Posts
    116
    download it, then save_data.zip.txt => save_data.zip, then open (there is no zip or tar extension here for the attach)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with writing to files
    By beanroaster in forum C++ Programming
    Replies: 10
    Last Post: 12-23-2007, 12:21 AM
  2. Reading & Writing files (Error)
    By Blackroot in forum C++ Programming
    Replies: 9
    Last Post: 01-10-2006, 11:55 AM
  3. Writing files to a CD
    By SyntaxBubble in forum Windows Programming
    Replies: 1
    Last Post: 04-16-2003, 04:43 PM
  4. *.COM Files? Writing them?
    By johnc in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 07-11-2002, 01:52 AM
  5. Making files, opening them, and writing to them
    By Unregistered in forum Game Programming
    Replies: 6
    Last Post: 06-18-2002, 09:57 PM