tag:blogger.com,1999:blog-5755313800906142262.post7813192851480443819..comments2023-07-05T04:29:26.568-05:00Comments on Simply a programmer: Importing files into a SharePoint document library using regular expressions and WebDAVTim Joneshttp://www.blogger.com/profile/04669425604711302507noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-5755313800906142262.post-15340007979829114272014-06-21T06:16:30.765-05:002014-06-21T06:16:30.765-05:00i got a similar kind of requirement. please help m...i got a similar kind of requirement. please help me out on that. could you provide steps for this project?Anonymoushttps://www.blogger.com/profile/01099606549115307498noreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-91844651609477129532014-05-26T17:57:43.737-05:002014-05-26T17:57:43.737-05:00Anonymous, I never ran into that situation, so it&...Anonymous, I never ran into that situation, so it's possible that you've run into a corner case with SharePoint and file uploads. Perhaps you should rename that folder to remove the accented character or try another API entry point.<br /><br />Regards,<br />TimTim Joneshttps://www.blogger.com/profile/04669425604711302507noreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-45224641687056958282014-05-22T19:29:59.638-05:002014-05-22T19:29:59.638-05:00We have a folder in the SP server that has an acce...We have a folder in the SP server that has an accented character. In our app, we encoded the URL that resulted to the following command:<br /><br />method=put document&service_name=/&document=[document_name=Shared%20Documents/Pr%C3%A9sentation/file.pdf;meta_info=[ContentType;SW|Document;vti_title;SW|]]&put_option=overwrite&comment=&keep_checked_out=false<br /><br />The response is: <br /><br />vermeer RPC packet<br />method=put document:15.0.0.4420<br />status=<br />- status=589830<br />- osstatus=0<br />- msg=There is no file with URL 'http://10.194.107.105/peteamsite/Shared Documents/Présentation/file.pdf' in this Web.<br />- osmsg=<br /><br />Any tip on what could be wrong?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-57152426792958108282014-03-17T09:35:12.146-05:002014-03-17T09:35:12.146-05:00Thanks man, great solution, saved me some headache...Thanks man, great solution, saved me some headache!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-20850809270309132562014-02-20T10:09:37.888-06:002014-02-20T10:09:37.888-06:00Jony, I'm not I understand your question. Thi...Jony, I'm not I understand your question. This code is/was running outside of the SharePoint environment. It was interacting with a custom database (my custom extranet) and the local file system. Once all the files were placed in a folder, I manually uploaded via Windows Explorer and WEBDAV. Hope that helps!Tim Joneshttps://www.blogger.com/profile/04669425604711302507noreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-73055424775301963782014-02-20T08:53:48.364-06:002014-02-20T08:53:48.364-06:00Hi Tim!
How can I run this kind of program outside...Hi Tim!<br />How can I run this kind of program outside of SharePoint environment? Like, if i try to make a windows app that runs SharePoint code, it won't work outside of SharePoint server cuz of the dlls... How can I solve it?Jonyhttps://www.blogger.com/profile/15980801994314306686noreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-65803681467615089382010-11-28T05:23:14.085-06:002010-11-28T05:23:14.085-06:00Beautiful post. Thanks for sharing.
zee
walisystem...Beautiful post. Thanks for sharing.<br />zee<br />walisystems.comzeehttp://www.walisystems.comnoreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-39567422424233706622010-05-21T01:13:52.339-05:002010-05-21T01:13:52.339-05:00Thanks for this helpful post...it surely saved a f...Thanks for this helpful post...it surely saved a few hours for me...:)Ashif Manjurhttps://www.blogger.com/profile/10701938265816804326noreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-50912631347939857712010-02-04T05:39:54.237-06:002010-02-04T05:39:54.237-06:00Thanks for a very helpful post. I really apprecia...Thanks for a very helpful post. I really appreciated the background information and reasoning behind your decisions.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-87102914568759527772010-01-20T07:57:13.436-06:002010-01-20T07:57:13.436-06:00Anonymous, I didn't upload a code project sinc...Anonymous, I didn't upload a code project since my file source is proprietary. The method above (and my subsequent comment) is the most important, and would simply need to be dropped into whatever collection you're iterating through.Tim Joneshttps://www.blogger.com/profile/04669425604711302507noreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-15501448362853913872010-01-20T01:22:46.743-06:002010-01-20T01:22:46.743-06:00I like the post you have here, i was curious if th...I like the post you have here, i was curious if there would be a vs solution that i could use so that i can learn how to do this. I have a very close requirement to what you are doing for what im looking to complete.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-2569027818267034442008-12-15T08:23:00.000-06:002008-12-15T08:23:00.000-06:00I haven't used it, but I think you might be intere...I haven't used it, but I think you might be interested in the <A HREF="http://www.codeplex.com/sushi" REL="nofollow">SharePoint SUSHI</A> project on CodePlex.Tim Joneshttps://www.blogger.com/profile/04669425604711302507noreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-41645923752278897502008-12-14T20:21:00.000-06:002008-12-14T20:21:00.000-06:00Is there a utility available on the market to prev...Is there a utility available on the market to preview and edit file names before importing into Sharepoint?<BR/><BR/>ThanksAnonymoushttps://www.blogger.com/profile/09781633303144250300noreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-51805487007078864862008-07-01T13:44:00.000-05:002008-07-01T13:44:00.000-05:00Thanks for the code snippet Tim. Saved me some Reg...Thanks for the code snippet Tim. Saved me some Regex thinking which can be a real pain in the behind!Unknownhttps://www.blogger.com/profile/14801520314277115996noreply@blogger.comtag:blogger.com,1999:blog-5755313800906142262.post-43827327870099320142008-05-30T22:49:00.000-05:002008-05-30T22:49:00.000-05:00Since the original post, I've had a little more re...Since the original post, I've had a little more reflection time on my example method, and have some suggestions for making it better. The maxLength assignment and the ApplicationException should be removed from the example method to increase performance. These 2 lines do not require anything within the method in order to run successfully. <BR/><BR/>After maxLength is calculated outside the method, it can be passed in using the maxItemLength parameter. The would also mean you no longer need the currentPathLength parameter. If a lot of items or folders exist in a given folder, this change should result in a small boost in execution time.<BR/><BR/>Considering you place the removed lines into a new method called GetMaxItemLength(), the new calling code would look something like the following.<BR/><BR/>private void ExportFolder(string name, int maxItemLength)<BR/>{<BR/>// new folder created<BR/>int folderPathLength = folder.FullName.Length + 1;<BR/><BR/>// calculate maximum item length for files<BR/>maxItemLength = GetMaxItemLength(folderPathLength, MAXFILELENGTH);<BR/><BR/>// loop for each file<BR/>fileName = GetSharePointFriendlyName(fileName , maxItemLength);<BR/><BR/>// calculate maximum item length for subfolders<BR/>maxItemLength = GetMaxItemLength(folderPathLength, MAXFOLDERLENGTH);<BR/><BR/>// loop for each subfolder and recursively call this method<BR/>ExportFolder(subfolderName, maxItemLength);<BR/>}Tim Joneshttps://www.blogger.com/profile/04669425604711302507noreply@blogger.com