Anaplan Connect Export to remote server
Hello,
I'm trying to run a script to export a file from Anaplan to a remote server.
Here is the line:
set Operation=-service "https://api.anaplan.com" -auth "https://auth.anaplan.com" -export "myFile.csv" -execute -get "\\myRemoteServer\myFile.csv"
But when i run it, it instead tries to find a repository called "myRemoteServer" on my local server.
Is there a way to do it and if so, what am I doing wrong ?
Answers
-
A remote location of the form \\computer\share\... in Windows is called a UNC path, and most programs don't handle them out of the box. One way to get around this is to use the pushd command to map the share to a drive letter, eg Z:\. before running Anaplan Connect, then the popd command to unmap the drive after it has finished. There is an appendix in the Anaplan Connect manual about this but it addresses having Anaplan Connect itself installed on a network share rather than just the export file, and pushd also changes the current working directory to that location so I guess you'd want it before the "cd %~dp0" rather than instead of it, but you'd also need to capture the mapped drive as a variable before the cd to use later. Alternatively can manually map it to a drive letter (I can't remember the exact procedure), and reference the drive directly, which is simpler but unlikely to survive a reboot.
1