Tuesday, November 11, 2008

Windows Data Migration Tools - Recusive! yahoo!!!

I've been doing my last flag for copy/moving user document function, which is comparing souce and target file and only copy the newer one from souce. It should check all sub-directories also. I was thinking to use os.path.walk, cos when i was talking in irc, someone told me to use it. So i go ahead... and.. here it came the nightmare.

I started coding this ReplaceOld function since 6am this morning.. I couldn't get it done after 4 hours of struggle, cos os.path.walk, dosen't allow me to do what I want. I need to go back to parent directory any time I want and I need the path after the source path. If I keep using this function, I may need to use nested array, which is headache and will use a lot of resources and do a lot of coding too.....

And this morning... finally, i figured out what to do... (on the way to washroom.. lol )...


Yes!! so, i dun have to assign a lot of array and just call up the function itself, that's it! As long as my calculate is right, it'd be okay. To me it's just something like an other "for..." loop. And it works!!

But of course, this function is not completed yet. But I'm still so excited! Hope I can finish this function before this week. Then I can move on other functions... ^^

Last night, I started coding from 7pm last night to 7am.. oh yeah.. 12 hours of programing.. hehe... I got 400 lines done so far. And if I'm done with this function, I have 3 totally working functions which included a lot of error flag checking already. And I've got a very smart design of flag sorter/reader function from someone's code on net.

Can't wait to see it? Wait for my WDMT 0.2 release! ^^

No comments: