Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FolderCopy 255 Charactor Path Limitation

Status
Not open for further replies.

pshelfo

IS-IT--Management
Apr 27, 2004
16
US
I am using the FolderCopy method in a backup vbscript which copyies a users My Documents directory to a network server. In a number of cases the Vbscript dies out whenever it hits the Windows 255 charcter path limitation. Using the on error resume is not an option since we need to now that the backup is not getting all the files.

I need to have the backup script continue its copy process even if it hits the 255 charactor path limition. What I also want to do is have the script create an error text file displaying the file path of the file that cause the error. So far I have found the function that dispalys the absolute path but I need the path count in order to through an error process.

My theory is to copy files until an exception occurs of which the script will write an log entry so we can go back and indentify which files have to be manually shorten.

Has anyone done this or have any helpfull sugesstions as to a method to use?
 
on error resume is not an option
I'm afraid it's the better option you have !
Tip: have a look at the Err object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
So there is not method that counts the path size?
 
And what about the Len function ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top