VBScript

15 pts.
Tags:
SharePoint
VBScript
I am having a problem moving large amounts data to a sharepoint server due to file path length. Below is the script I have but it not going to work because it looks for two seperate values only. I need one that will check the entire path and filename and if it exceeds the value I out in then it will record the filepath and file name to a log file. I need a little help, Thanks Const ForWriting = 2 StartFolder = "C:restore" LogFile = "C:256Length.log" Set objFSO = CreateObject("Scripting.FileSystemObject") Set objLogFile = objFSO.OpenTextFile(LogFile, ForWriting, True) Call CheckFolder(StartFolder) Set objFSO = Nothing objLogFile.Close Sub CheckFolder(Folder) Set ArrFiles = objFSO.GetFolder(Folder).Files For Each File In ArrFiles IF Len(File.name) > 50 THEN objLogFile.WriteLine File Next IF Len(Folder) - instrrev(Folder,"") > 256 THEN objLogFile.WriteLine Folder Set ArrSubFolders = objFSO.GetFolder(Folder).SubFolders For Each SubFolder In ArrSubFolders call CheckFolder(SubFolder) Next End Sub

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following