As Alejandro wrote, the command line length can be modified a bit.
In your case it might help to just change your path just before running the DOS command to the longer path and afterwards change it back.
Your command line will be shortened to
lcommand = 'xcopy *.pdf ..\..\quitelongdir2\permits\*.PDF /S /Y'
Should work a while longer...
HTH
thomas