apex52 Posted April 21, 2004 Share Posted April 21, 2004 I need to write a script which will do the following: Read the first line from a text file( a list of numbers 1 through 999) and put the number into another file on a specific line. It also needs to delete the line it just read so it will not duplicate the number entered. We run this educational software called CCC and it requires a unique station ID from 1 to 999. We currently have to modify the numbers by hand and after a year or two, we start duplicating numbers, it is especially irritating after we image a school. Can this be done in autoit or does anyone know of an easier way? Link to comment Share on other sites More sharing options...
esfalk Posted April 21, 2004 Share Posted April 21, 2004 Question: On the first line of text containing numbers, how are they delimited? (Separated). Clarification: There is one line of numbers 1-999 (randomized?), you want to take a number (say, 372) and plug it into a spot (designated by what?) in another file (always same file?). Then you want just that number (372) removed from the origional file? Is there anything else in the origional file? Link to comment Share on other sites More sharing options...
apex52 Posted April 22, 2004 Author Share Posted April 22, 2004 The numbers will be on individual lines in sequential order in an answer file on the server. The number will plug into a specific line or possibly replace a specific line all together in a file located on the workstations. ( It is suppossed to say Station ID=XXX) Then the number needs to be removed from the answer file so it will not duplicate it on the workstations. The answer file will only contain the numbers. The workstations file, called environ.ccc has other pieces of info, but I can make sure each file is the same by snapshot. Link to comment Share on other sites More sharing options...
Fossil Rock Posted December 14, 2005 Share Posted December 14, 2005 How exactly are you removing the line? Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
sandyd Posted December 15, 2005 Share Posted December 15, 2005 read the first line and insert into your other file loop read next line write to temp file endloop rename temp file to first file name ----[ SandyD ]--- Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now