Mark wrote:Hi Keyless,
I started to write an example script for you and then realized I didn't understand what you are actually trying to do. So, let me answer your question with more questions.
Do you really need those fields? What exactly do you need them for?
Are you copying files, or something else? Do you really need user intervention, or do you actually always want to stop of there is a duplicate? Or do you always want to continue, just skippting the duplicates?
What is the most likely scenario, if there are 100s of duplicates? I'm sure, no use will ever click the Okay button 100s of times.
Best,
Mark
Thanks Mark.
This is about copying files. What I am doing is checking another variable for duplicates & if a duplicate file is found, I want to ask the user if they want to continue and copy the file anyway, or stop the copying of that file. The Filepathlist needs to be adjusted accordingly so it can be passed on to the copy and delete handler. The likely scenario is that there will not be a lot of duplicates, this is just a "just in case"
Code: Select all
Replace Npath with Empty in FilePathlist
doesn't seem to work right. I thought it was working but noticed a problem when I tested with three duplicates and chose stop for all three. 2 of the duplicates copied anyway.
I switched it to
but oddly that would work for two duplicate files but not 3 ????
What I ended up doing is just putting each stopped Npath into a new variable [lRemove].
I then used another repeat further down the code:
Code: Select all
repeat for each line OPath in lRemove
filter FilePathList without OPath
end repeat
This works.
Still baffled why the same thing didn't work inside the original repeat loop, but I suspect it has to do with the fact that the lines were coming from FilePathList, which was being filtered in its own loop. Seems like a bug that it doesn't work though.
I have a second question of what to do about hidden files in Windows (ie Thumbs.db). I don't want them included when the filepaths are put into Filepathlist. Is there an easy way to filter hidden files out? right now I am just filtering Thumbs.db out, but I suspect this has come up before and there is a simple way to avoid hidden files.