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,
Const ForWriting = 2
StartFolder = "C:restore"
LogFile = "C:256Length.log"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objLogFile = objFSO.OpenTextFile(LogFile, ForWriting, True)
Set objFSO = Nothing
Set ArrFiles = objFSO.GetFolder(Folder).Files
For Each File In ArrFiles
IF Len(File.name) > 50 THEN objLogFile.WriteLine File
IF Len(Folder) - instrrev(Folder,"") > 256 THEN objLogFile.WriteLine Folder
Set ArrSubFolders = objFSO.GetFolder(Folder).SubFolders
For Each SubFolder In ArrSubFolders
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!