This is interesting, might give it a go. If not happy with the returns, is this a command to get all the coins back into one address rather than do 500 transactions?
You can just send your total balance to 1 address. If you want to get rid of the addresses from the wallet after doing that, send to 1 address, dumprivkey of that address, delete wallet.dat, reopen wallet and importprivkey. Always back up wallets when doing this.