Simple Dos Window App:
Takes a txt file and converts it into 2 files (give a me a quote for each part). Please look at the attached PDF and design spec.
Takes a string such as the 2 lines below:
1234567,This-is-a-test-with-spaces PP 2.25
1234567,This-is-a-test-with-no-spaces
Makes a 2 new text files (first looks like this:
get [login to view URL] -o
get [login to view URL] -o
The second file is just taking the original file and making it all lower case
1234567,this-is-a-test-with-spaces pp 2.25
1234567,this-is-a-test-with-no-spaces
The quote is for the total, but in the message field please break it up into 2 portions (part a - the file that does the "get " and part b - the file that makes everything lower case.
Below is the spec - I have it in PDF form attached.
Thank you,
Al
String manipulation 3:
str3 [input_file] [output_file1] [output_file2]
options: /? - help
/p – show the output as it is being displayed to the file (in case I need to debug)
Description: Manipulates a text file and converts them into 2 new files
PARMS_STR3 File:
add_to_start_of_line = “get “
cd = “cd /htdocs/lof/p” | “NULL” - if NULL do not add line
add_to_line =“.jpg” - string to add to end of line (test also with “.jpg –o”)
INPUT FILE:
[login to view URL] – is the default (can use a different name on the command line)
OUTPUT FILE
[login to view URL] – is the default for output_file1 (can use a different name on the command line)
[login to view URL] – is the default for output_file2 (can use a different name on the command line)
PROGRAM DESCRIPTION: string manipulation to make get files and lower case file.
PART 1:
1) It will first read from the PARMS_STR3 File to see if the first line of the output file is a change dir “cd” if it is NULL, then do not put cd command on line 1 of the output_file1, if it contains data, just put the command as shown in the PARMS_STR3 file (if cd = NULL then do nothing else put cd/htdocs/lof/p on line one of [login to view URL] (default output_file1)
2) It will read from the input .txt file ([login to view URL] is the default)
3) The program will read the line until a “,” is reached and skip those characters including the “,”
4) The program first writes from the PARMS_STR3 File add_to_start_of_line in this case “get<space>” to the output_file1
5) The program will then collect the string from after the comma until a space is reached (if no space is reach –meaning end of line <EOL>, then grab the whole line (so if the line is like the following: 12345,This-is-a-Test PP 2.25 then grab This-is-a-Test (the rest of the text on the line after the space is to be ignored)… if the line is 12345,This-line-has-no-spaces then grab This-line-has-no-spaces
6) Then read from the PARMS_STR file add_to_line (it usually is going to be either .jpg or .jpg –o) so if the add_to_line =”.jpg”, then the above two lines would read [login to view URL]
7) Go to next line
8) Repeat until end of file
PART 2:
1) Takes the line of the input_file and converts any CAPITAL CHARACTER to Lower Case and puts it in output_file2 - so if the input file reads on line 1 : 12345,This-is-a-Test PP 2.25 the output_file2= will read 12345,this-is-a-test-pp 2.25
Hi there. Looking forward to work with this project.
I'm a programmer for more than 10 years specially in languages such as VB6,SQL,MsAccess, C, etc
Cya soon