Hi Community,
Has anyone got any sample batch files to hand for a process that includes a number of imports?
Many thanks,
Callum
HI @CallumW,
Here you go,
@echo offset AnaplanUser="firstname.lastname@company.com"set WorkspaceId="8a1234567897c12b014bf01234567890"set ModelId="CB0A5A4D5C5943B5837FF42C5FAA95E1"set Operation= -file "file1.txt" -put"C:\Files\ImportModule.csv" -file "file2.txt" -put "C:\Files\example.csv"-process "myprocess" -execute -output "C:\MyDirectoryForImportDumpFiles"rem *** End of settings -Do not edit below this line ***setlocal enableextensions enabledelayedexpansion || exit /b 1cd %~dp0if not %AnaplanUser% == "" set Credentials=-user %AnaplanUser%set Command=.\AnaplanClient.bat %Credentials% -workspace %WorkspaceId% -model %ModelId% %Operation%@echo %Command%cmd /c %Command%pause
I hope this helps!
Regards,Kavin.
Hi @kavinkumar
I am having issues with the authentication (Code 500, internal server error) also being prompted for the address instead of automatic.
In addition, if I have two actions that the same file, how do I present that in the script? -file "" -put"" -put"" or separate -file"" -put"" for each action.
Best,
1. Please double-check your credentials, Workspace and Model Ids or check if the model is the live state (Not in the archived mode).
2. If the actions are using the same import file then there is no need for writing the script 2 times. Once the file hits the Anaplan, the data will be stored in 'Import Data Source' and no need to do the same activity again (-file "" -put"")
Hi @kavinkumar ,
Thanks for the info.
Unfortunately still having issues with authenticating (same error message) and have checked all ID's for consistency.
Ran an old import process with identical details and the API authenticated fine.
Any thoughts?
I should also note, my previous script was using 1.4.1 and my new one is using 1.4.3
*Update - ran the new script using the old API and I had the same 500 error.
Dear Team ,
I have a Requirement like i am using Anaplan Connect on Windows server where I need to Write Import Script for dataload from Windows server to Anaplan system .
Suppose i have 1 Folder named (Import Files) in Windows server where my ETL Team will place file . Once I will run the Import Script to read file from Import File folder , that files should get appended with Time Stamp when that get loaded in Anaplan and move this file into Folder 2. Archive Folder.
So can you please help me with the Script Command where i can pass the logic to move loaded file from the Import Folder to Archive folder by adding timestamp to the loaded file.
Kindly do help me with the sample script for same in Anaplan Connect it would be great support!
Warm Regard
Deepak
I think I just answered this on another post!With folders named "IMPORT" and "ARCHIVE" in my example a script for that is:
@Echo onfor /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%aset YYYY=%dt:~0,4%set MM=%dt:~4,2%set DD=%dt:~6,2%set HH=%dt:~8,2%set Min=%dt:~10,2%set Sec=%dt:~12,2%
set stamp=%YYYY%%MM%%DD%_%HH%%Min%%Sec%
for /R "%CD%\IMPORT" %%f in (*.txt) do (move /Y "%%f" "%CD%\ARCHIVE\%%~nf_%stamp%%%~xf")
Hi everyone 👋 If you build or maintain Anaplan models, you've probably hit the same walls I kept hitting. Some basic questions about a model's structure have no single screen to answer them. You end up clicking through modules and pages one by one, or writing API scripts just to get a list. These were the gaps that…
Hi Everyone, We have a requirement in Anaplan Consolidation & Reporting (Fluence) where the Entity Structure needs to change effective January 2026. The key requirement is that the existing entity structure should continue to be applicable for all reporting and consolidation periods through December 2025, while the new…
We've been building a tool called aplan4sheets and we'd genuinely like input from this community — both on what we've built so far and on what we should prioritize next. The problem we set out to solve: Anaplan's Excel add-in is Windows-centric, and there's no real native way to pivot Anaplan data in Google Sheets. We…