anandnz 1 Posted February 17, 2011 Hi AutoIt Gurus, Thank you for all the help, i am trying to add little bit intelligence to my program which basically publishes the documents and copies to destination. Since the publisher is a third party, i want to confirm the document i have published is same i am copying to the destination folder. My idea is to ensure the document has a file name, same as i am asking to publish at a particular location in file and compare it against it every time. Searching the whole file for the file name may mislead as i may get lot of references. Now how to read a particular location of the file. Say header of the file, which i propose to have same file name i am print FileReadLine() i guess reads line by line all the lines of the document. Is there a quick way to FileOpen() read a particular string at a particular location and confirm that file is right. Appreciate your help. Thanks in advance -- Anand Share this post Link to post Share on other sites
PsaltyDS 39 Posted February 18, 2011 FileReadLine() accepts a parameter for line number. If you know which line you want, there is no need to loop through them. If you have a byte offset you could use FileSetPos() to go there for FileRead(). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
anandnz 1 Posted February 18, 2011 Thank you PsaltyDs, Probably i will write into template the file name, based on which documen is published. get the filegetpos() to use filesetpos() to read to compare the contents. Thank you. cheers --Anand Share this post Link to post Share on other sites