|
|
|||||||
Hi, I need to compare recursivly the contents of two folder, but I don't understand how can I do. I don't know in advance which file or directory are inside the directory, so I have to check in a "master" directory it's content and verify if a "slave" directory content is the same. Someone can help me?? Max |
||||||||
|
|
|||||||
There are recursive DIRs available in the UDF forum - a quich search should turn these up. The process is actually pretty simple.
|
||||||||
|
|
|||||||
tks, but a tking: where I can find the UDF tools, such DIRPLUS and QSORT?? |
||||||||
|
|
|||||||
http://kixhelp.com/udfs/ |
||||||||
|
|
|||||||
And here is an example of how you can compare the two lists once they are sorted: Code: Break ON |
||||||||
|
|
|||||||
What's wrong with our own site? www.kixtart.org/udf |
||||||||
|
|
|||||||
it's not in my favorites...as of now. |
||||||||
|
|
|||||||
I just wish they would have standardized the mirrors to the mothership. KORG is in /udf/, Ron's in /udfs/, and Bryce's is udf.isorg.com. Not sure about Lonk's... the URL jokeli.isa-geek.com/UDF linked from Bryce's mirror no worky. |
||||||||
|
|
|||||||
ja, dropped it offline when saw the electricity bill |
||||||||
|
|
|||||||
Ok, ok I tried to use these function udfCompare and Dirplus for check two directories quiet different, but I didn't see any result...... What's wrong? this is the script $dirNameSlave = "C:\Temp\dirA" $dirNameMaster = "C:\Temp\dirB" $filesSlave = Dirplus($dirNameSlave, '/s') $filesMaster = Dirplus($dirNameMaster, '/s') udfCompare($filesSlave,$filesMaster) |
||||||||
|
|
|||||||
Think you need to read up on using KiXtart and UDF in general, you can't just call a UDF and then not tell the script what to do with the returned data. That aside... what do you want to do with this information once you have it? If you're wanting to MIRROR folders/drives then ROBOCOPY would be much better at automatically handling this for you and it too is FREE. |
||||||||
|
|
|||||||
If they are identical you won't see anything. |
||||||||
|
|
|||||||
Hi, I don't want mirror the master dir in slave dir, but only check the difference (richard, the directories are different..). I wrote this function and seems that the result are ok, what do you think about that? $dirNameSlave = "C:\Temp\dirA" $dirNameMaster = "C:\Temp\dirB" dirCompare($dirNameMaster, $dirNameSlave) Function dirCompare($masterPath, $slavePath) $filesSlave = Dirplus($slavePath, '/s') $lenSlavePath = len($slavePath) For Each $file in $filesSlave If Not (exist($masterPath + right($file, len($file) - $lenSlavePath))) ? "The path " + right($file, len($file) - $lenSlavePath - 1) + " doesen't exist in " + $masterPath Endif Next EndFunction |