Questions about xml and xlsx configuration files

Jul 27, 2016 at 2:04 PM
I have some simple questions about xml configuration files :

1- What are the other possibilities of the tag <ItemExistsBehaviour>Overwrite</ItemExistsBehaviour> ?

2- is it possible to set the overwrite only when the file is newer ? (based on last modified date for exemple)

3 - is it possible to avoid typing the hierarchy in the xlsx file for subfolders ?

thank you
Jul 27, 2016 at 2:31 PM

MarwenK

DIFS is really designed for complex migrations where you want to set meta data and content type – which is why it uses an OleDB data source like Excel or SQL. It is often used for migrations from old ECM systems like LiveLink or demanding file share migrations.

The questions you have asked make it sound like you are are trying to sync a file share into SharePoint. Since this what the OneDrive for business client does there are no plans to introduce this sort of functionality to DIFS.

Have you tried achieving your goals with the OneDrive for Business client?

Jul 27, 2016 at 3:19 PM
Yes @MadAboutImport I understand what you mean

but in addition of specifying content types and other metadata to most of the list items we also want to keep the hierarchy of files, folders and subfolders

that was the purpose of my post :)
Jul 27, 2016 at 3:45 PM

MarwenK,

Ok, understand. Normally I just audit the whole file system to Excel (CSV) using Powershell, drag down a default content type column etc for every file. For the destination filename column I take a copy of the original file name and then do a search a replace for any special characters which SharePoint won’t allow. After that I then change contents types for the kind of special exceptions that you talk about. Then I run the import.

If your source looks like this;

<SourceDataSetType>OLEDbTable</SourceDataSetType>

<OleDbSourceDataSetSettings>

<ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Folders.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=0";</ConnectionString>

</OleDbSourceDataSetSettings>

<OleDbTableSourceDataSetSettings>

<TableName>clients$</TableName>

</OleDbTableSourceDataSetSettings>

</Source>

And your source (xlsx) must contain the following columns (import key must be a unique number – i..e 1,2,3,4 and ImportStatus must be “Import” for everyrow );

ImportKey

ImportStatus

Exception

Then the data source will be updated to reflect if the item was successfully imported and any Exception encountered. You can then correct any problems, change import status for those rows and re-run the import.

This is useful for large imports when files fail because they have illegal extensions, are too big, are in use by a user etc.

Will try and post an example in due course

Jul 27, 2016 at 4:59 PM
you really let me see other senarios !

I added 3 columns

ImportKey

ImportStatus

Exception

and populated ImportKey with numbers 1, 2, 3, ....
and typed Import for all lines in ImportStatus

I run the import but can't see the results in xlsx file ! (and even when i delete "imported" from a line all the files tries to be imported)

what am I missing please ! ?
Jul 27, 2016 at 5:44 PM
Check that you are using a table data source - see xml above

Jul 27, 2016 at 6:07 PM
Yess that's right
worked fine
thank you very much :)