I am attempting to use the attached script to backup the Users folder on a Vista Home Premium machine. The script fails however when it gets to the first users Application Data folder. I will try to explain this clearly: It gets stuck in a loop where it keeps adding "Application Data" as a subfolder to the current folder (which is the actual Application Data folder), and trying to look for files that need copying in that non-existant folder. So in the first loop it is looking for "Users\Bob\Application Data\Application Data", then in the next loop it is looking for "Users\Bob\Application Data\Application Data\Application Data". Eventually the folder name gets so long it fails with Error 1921: The name of the file cannot be resolved by the system.
The attached images from the Command window when the script runs may more clearly show what is happening. Why is this occurring and how can I remedy it?