xcopy 255 characters limitation walk around

Ever tried using the xcopy command and face an error 'insufficient memory'? This is probably due to the path of the files that you are copying exceeded 255 character. This is the limitation of xcopy.

After googling for an walk around, i stumble upon robocopy which is an administrator utility within the Windows 2003 Resource Kit Tools. The fundamental of robocopy is based on xcopy. It have advance features and comes with no 255 characters limit! Isn't that great?

It works for both 32bit and 64bit OS (Operating Sytem) and NT filesystem only. Do take note of that.

There's a CLI (Command Line) version and a GUI Version. I would strongly recommend using the CLI Version as it comes with all the advances features of robocopy.

Most often command that i use are as follows

/b - opens files in backup mode. Backup mode allows files to be opened without security restrictions, but requires additional rights on both the source and destination systems.

/s -copies subdirectories unless they're empty (like XCOPY)/e - copies subdirectories, even empty ones (like XCOPY)

/xo - eXclude Older files (Please note that the Robocopy GUI (3.1.1) does not seem to use this switch correctly, meaning it still copies older files over newer ones.)

Below are some sites on Robocopy:

Information
http://en.wikipedia.org/wiki/Robocopy
http://www.ss64.com/nt/robocopy.html

GUI Version
http://www.microsoft.com/technet/technetmag/issues/2006/11/UtilitySpotlight/

CLI Version
http://go.microsoft.com/fwlink/?LinkId=72969

No comments: