Closed Joey055 closed 5 years ago
Just saw that some stars were missing in my previous post
{ "sourceDirectory": "src", "sharePointSiteUrl": "xxx", "publishingScope": "None", "authenticationType": "NTLM", "storeCredentials": true, "remoteFolders": [ "/Style Library/NRB/**/*", "/Style Library/NRB/js/", "/Style Library/NRB/css/", "/SiteAssets/**/*", "/_catalogs/masterpage/*/" ] }
=>
Starting File Synchronization... Successfully downloaded 12 files to: src/Style Library/NRB/css/ Successfully downloaded 13 files to: src/Style Library/NRB/js/ Successfully downloaded 0 files to: src/_catalogs/masterpage Successfully downloaded 0 files to: src/SiteAssets Successfully downloaded 0 files to: src/Style Library/NRB file synchronization complete.
Hello @Joey055 -
SPGo uses Glob notation to specify downlod file format.
You have the correct notation (/**/*
) to recursively download all files and folders. The glob notation to download all files recursively from Style Library and all files directly under the masterpage directory would look something like this:
{
"sourceDirectory": "src",
"sharePointSiteUrl": "xxx",
"publishingScope": "None",
"authenticationType": "NTLM",
"storeCredentials": true,
"remoteFolders": [
"/Style Library/**/*",
"/_catalogs/masterpage/*"
]
}
Yes but it's not working anymore since few days... Just successfully download 0 files. I'm using the same config files since few months and it was working perfectly before :/ Any ideas of what could have change?
The reason it changed is that I implemented a much more full featured glob parser, giving support for extended formatting, and grouping clauses. The result is much more control over your files, at a trade for requiring more strict syntax usage.
Ok, but the simple /*/ doesn't work anymore. What the new syntax to get all the files and subfolders ?
Hello @Joey055 -
The Globstar pattern (**/*
) is working correctly in all of my test environments. I am not sure why it is not working for you. Even when I build overlaps into my remoteFolder
property, it is correctly downloading all files.
A few notes to help you with the entries you have in your remoteFolder
data:
"/Style Library/NRB/**/*"
- this is formatted correctly and should download all files and folders, recursively, under the /Style Library/NRB
folder."/Style Library/NRB/js/"
- this folder is included in the above globstar pattern and isn't necessary as a separate line."/Style Library/NRB/css/"
- this folder would also be included in the first globstar pattern and isn't necessary as a separate line."/SiteAssets/**/*"
- this is formatted correctly and should download all files and folders, recursively, under the SiteAssets
folder."/_catalogs/masterpage/*/"
- you need to remove the trailing slash: `"/_catalogs/masterpage/*"'If it would help, do you mind telling me which folders and files you would like to download from your SharePoint web and I'll help you craft a remoteFolders
property value which will get you what you want.
Thanks for working with me on this.
That's why I gave you the console output Successfully downloaded 12 files to: src/Style Library/NRB/css/ Successfully downloaded 13 files to: src/Style Library/NRB/js/ Successfully downloaded 0 files to: src/_catalogs/masterpage Successfully downloaded 0 files to: src/SiteAssets Successfully downloaded 0 files to: src/Style Library/NRB
line 2 and 3 are working, the others not :/
Some other logs can be found to give you more info about what is happening?
Unfortunately, since I'm not able to reproduce this issue I'll need to rely on you for more info.
Can you replace your remoteFolders
value with the following:
"remoteFolders": [
"/Style Library/NBR/**/*",
"/SiteAssets/**/*",
"/_catalogs/masterpage/*"
]
Also, I'm sure you are, but can you confirm that you are using SPGo 1.4.2?
Thank you!
Yes it's the 1.4.2
{ "sourceDirectory": "src", "sharePointSiteUrl": "xxx", "publishingScope": "None", "authenticationType": "NTLM", "storeCredentials" : true, "remoteFolders": [ "/Style Library/NRB/**/*", "/SiteAssets/**/*", "/_catalogs/masterpage/*" ] }
SPGo enabled. Configuration file reloaded Starting File Synchronization... Successfully downloaded 0 files to: src/Style Library/NRB Successfully downloaded 0 files to: src/_catalogs/masterpage Successfully downloaded 0 files to: src/SiteAssets file synchronization complete.
@Joey055-
Is there any chance that you are working on the root web of the root site collection (e.g. https://mySharePoint.company.com
)?
I think I've found an issue when working with certain Glob commands against this site.
Yes in this case I'm in the root of the webapp. I didn't try if it worked or not in a subsite. I will try tomorrow at the office.
You found the issue ;-) I just tried in other workspace with a subsite and there it works fine. Please let me know when this bug will be fixed :-)
Since you have confirmed the root cause, I will have a fix out in the next day.
Version 1.4.3 has been published to the Visual Studio Marketplace. Please update to the latest version and confirm here if the issue is resolved.
Well Done! It works :-)
Since the last update I can't populate recursively my remote folders :s Before that it was working very well. Is there a new syntax? If I set folder one by one it works but... It was easier before.
{ "sourceDirectory": "src", "sharePointSiteUrl": "xxx", "publishingScope": "None", "authenticationType": "NTLM", "storeCredentials": true, "remoteFolders": [ "/Style Library/*/", "/SiteAssets/*/", "/_catalogs/masterpage/*" ] }
=>
Configuration file reloaded Starting File Synchronization... Successfully downloaded 0 files to: src/_catalogs/masterpage Successfully downloaded 0 files to: src/SiteAssets Successfully downloaded 0 files to: src/Style Library file synchronization complete.