E3pO Posted August 9, 2009 Share Posted August 9, 2009 Hello, Today i need some help on replacing all the offsets in a file that link to 0x00864C7C. For instance, if i load up a file in a program it will have "jonny.cool, jonny.bob, jonny.hagw". If i look in hex, i only see one jonny. It is located at 0x00864C7C. I need to do a recursive change on a large file "Sometimes over 100mb's. So instead of jonny.cool, jonny.bob, and jonny.hagw, It will produce, 1.cool, 2.bob, 3.hagw in the order that the name was replaced. What would be the best way of going about this? Quote Link to comment https://forums.phpfreaks.com/topic/169451-c-reading-large-files-and-replacing-offsets/ Share on other sites More sharing options...
E3pO Posted August 9, 2009 Author Share Posted August 9, 2009 all the pointers*. Sorry couldn't find an edit button. Quote Link to comment https://forums.phpfreaks.com/topic/169451-c-reading-large-files-and-replacing-offsets/#findComment-894023 Share on other sites More sharing options...
E3pO Posted August 9, 2009 Author Share Posted August 9, 2009 Am i missing something because i do not see an edit button!!!!!!! Revision 2... Hello, Today i need some help on replacing all the pointers in a file that link to 0x00864C7C with numbers, such as "1, 2, 3". For instance, if i load up a file in a program it will have "jonny.cool, jonny.bob, jonny.hagw". If i look in hex, i only see one jonny. It is located at 0x00864C7C. So, what i need to do is a foreach pointer that is 0x00864C7C change to a number. The number will be the pointer number, for instance the first pointer the program finds will be number 1, the second pointer it finds will be number 2. Another thing is some of the files i'm working with can be over 200mb's, so i need a good way to load them and do this. Example: Input: jonny.cool, jonny.bob, and jonny.hagw Output: 1.cool, 2.bob, 3.hagw What would be the best way of going about this, Thank you, Will Quote Link to comment https://forums.phpfreaks.com/topic/169451-c-reading-large-files-and-replacing-offsets/#findComment-894045 Share on other sites More sharing options...
captbeagle Posted September 9, 2009 Share Posted September 9, 2009 Well, if that's the pointer address within the program executing, it seems to me as though you'd need access to the source code in order to change the execution. And if you have access to the source code, why would you need to modify the value at that memory location? It seems to me that if you were to just add an int that kept track of iterations, every time your program noticed that the filename contained "johnny", it'd just remove "johnny" and rename the file as: int_value & "." & rest_of_filename The size of a file shouldn't have an impact as to the time it takes to rename it, as it's just a modification to the directory index. ----------------------------------- Now, if you just wanted to rename your files outside of the program, why not use an already developed tool such as the ReNamer (http://www.den4b.com/projects.php). After some brief Googling, I managed to find several good reviews about it and that link to download it. Am I at all close to what you're asking about? Quote Link to comment https://forums.phpfreaks.com/topic/169451-c-reading-large-files-and-replacing-offsets/#findComment-915267 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.