R.Tutus

Has any one coded some thing that copies a windows root folder structure to sql server
Thanks a lot


Re: Visual C# General copying a windows folder structure to sql server

Ross Dargan

That wont be that tough to do, I suppose the most important question is why are you doing it




Re: Visual C# General copying a windows folder structure to sql server

R.Tutus

I i want to upload that structure to a sharepoint site. I m not sure yet if that s possible in sharepoint

if someone familiar with sharepoint pls help

Thanks






Re: Visual C# General copying a windows folder structure to sql server

Ross Dargan

Where abouts in sharepoint do you want to put it (list, each folder=node,...), and for what purpose

Ross






Re: Visual C# General copying a windows folder structure to sql server

R.Tutus

The user will enter a folder path, then I will create a master site for my documents, then for each sub folder in the provided path, i will create a site inside my master site. Then each subfolder again will be associated to a document library in the site. Then in the document library I will need to upload all the files of the subfolder. that will be done for each subfolder.

So the structure will be like this: provided explorer root folder rootFolder  path will be associated to a master site masterSite

Each FolderN of the rootFolder  will be associated to a siteN of the masterSite. Then

in FolderN  for example there will other subfolders subfolder1, subfolder2, subfolder3....subfolderM

each subfolder in the level subfolderM will be mapped to its corresponding document library docLibM.

Finally we will upload all the files in each subfolder subfolderM  to its corresponding  document library docLibM.

One more thing, the site structure in sharepoint will be created dynamically according to the input folder, since my script is supposed to create the site structure as well.

No files are located in the levels rootFolder  or FolderN  . all the files are located in the level subfolderM .

What do you think

Thank you

 






Re: Visual C# General copying a windows folder structure to sql server

Ross Dargan

Ok, what you are asking can be done - Im not sure why you would use SQL though, you really need to use the SharePoint sdk for this. What you are trying to do sounds quite complicated, you need to ask yourself two questions

A) Can it be done easier - you will confuse your users if it is too complicated

B) Are you sure it caní»t be done easier

If you are 100% sure that it caní»t be simplified (K.I.S.S), and that this will be user friendly enough then I can help you build this in SharePoint (ish anyway, my SharePoint knowledge is iffy to say the leastJ)

Ross (http://blog.the-dargans.co.uk)






Re: Visual C# General copying a windows folder structure to sql server

R.Tutus

no ross you re right. i m not sure this is the best way especially there will be no user. this script will run only one time by me on a specific rootfolder.

The reason why i thought about sql was that I thought there is a way in sharepoint to upload things from sql directly to a site structure, but that doesn t seem to be the case. Any way i started doing that in sharepoint sdk as you suggested.

let me know if u think of any easier way . waiting for your help.

thanks amigo






Re: Visual C# General copying a windows folder structure to sql server

Ross Dargan

The sharepoint SDK is the easiest way to go for what you are doing, what is the purpose of all this though - who will use the end result and how

Sharepoint can use sql (its called the business catalogue) but I would not advise this route!

Hope this works for you - if you are happy with the response please close the thread by accepting an answer:)

Ross






Re: Visual C# General copying a windows folder structure to sql server

R.Tutus

how about copying just one file to a specific document library in a specific site. any idea how that s possible

Thanks