Have you ever tried to run a command like rm to delete several hundred thousand files? I am not sure what the limit is but any time it is exceeded you need to use a work around like below (which will delete any number of files).
find . -maxdepth 1 -name "*.*" -print0 | xargs -0 rm