Publishing to OneDrive, or, variables in destinations

This forum is for all Flare issues not related to any of the other categories.
Post Reply
richt
Propeller Head
Posts: 42
Joined: Wed Nov 28, 2018 6:38 am

Publishing to OneDrive, or, variables in destinations

Post by richt »

We publish lots (I mean hundreds) of PDFs to various Sharepoint repositories, all synced with OneDrive. We haven't worked out to publish directly to Sharepoint, so the Flare user's local OneDrive folder is set as the Destination path, like so:

Code: Select all

C:\Users\Username\Company\SharePoint repository\sub-folder\2021 MCF Output
This works fine if its one-project-per-writer, but if there are two contributors to a Flare project then we either have to keep editing the Destinations depending on who's publishing, or duplicate the Destination and all associated Targets (100+) per contributor, which is unrealistic.

So, is it possible to make the Username section of the Destination path a variable? Or is there a smarter way of handling this?
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Publishing to OneDrive, or, variables in destinations

Post by NorthEast »

I have a similar issue (with local folders for a project import) which I fix using a drive mapping.

Each person could set up a drive mapping, e.g. drive S: = C:\Users\YourUsername\Company\SharePoint repository\ (set this to whatever folder level makes sense).

To do the drive mapping, I first create a text file with the following, and save it with a *.bat extension (so it's run as a batch file).

Code: Select all

subst S: "C:\Users\YourUsername\Company\SharePoint repository\"
To run the file when I sttart windows, I create a shortcut link to the batch file in my user startup folder - C:\Users\USERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Then set your Flare destinations relative to your mapped drive letter, e.g. S:\sub-folder\2021 MCF Output
richt
Propeller Head
Posts: 42
Joined: Wed Nov 28, 2018 6:38 am

Re: Publishing to OneDrive, or, variables in destinations

Post by richt »

That's a really interesting approach! My specific use case might end up running out of drive letters in the long run, but it's definitely a practical workaround.

How much of that could potentially by set up by a pre-build event? I wonder if you could run the batch to assign the drive at build time rather than on Windows startup.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Publishing to OneDrive, or, variables in destinations

Post by NorthEast »

richt wrote:That's a really interesting approach! My specific use case might end up running out of drive letters in the long run, but it's definitely a practical workaround.

How much of that could potentially by set up by a pre-build event? I wonder if you could run the batch to assign the drive at build time rather than on Windows startup.
I've not tried it as a pre-build event, as I need the drive mapping to run imports (which aren't at build time).


If you're careful about how you set up the drive mapping, then I don't think you should run out of drive letters.

Use the drive mapping to replace the part of the file path that is going to vary between each person's PC, so you might use:
S: = C:\Users\YourUsername\Company\SharePoint repository\
or map higher up the folder structure:
S: = C:\Users\YourUsername\

So relative to the mapped drive letter, the folder structure below that (used in the destinations) should be the same on everyone's PC.
Post Reply