in reply to Re: Compare 2 arrays
in thread Compare 2 arrays

Hi GrandFather,

Thank you for your responds and your suggested codes but your codes also deletes all the files in the directory.

Do you have any other ideas?

Replies are listed 'Best First'.
Re^3: Compare 2 arrays
by GrandFather (Saint) on Jun 28, 2016 at 21:03 UTC

    It may be that your file lists files to be removed where I assumed it listed files to be kept. You can tell that from the name of the keepList variable. You simply need to change keepList to removeList and change the sense of the exists test.

    Look at the code. Think about the code. Read the documentation for anything you don't understand. If you still can't figure it out, come back and ask about the elements of the code you don't understand.

    Premature optimization is the root of all job security