> For the complete documentation index, see [llms.txt](https://ssdocker.tribalknowledge.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ssdocker.tribalknowledge.tech/api-tutorials/postgres/windows-batch-file.md).

# Windows Batch File

**Step 1- Initialize Pod**

```
curl -X "POST" ^
  "http://localhost:8080/api/Pod/Init?username=[username]&password=[password]" ^
  -H "accept:  text/plain" 
```

**Step 2- Upload SQL Files to Pod.   Below shows you how to add multiple files.**&#x20;

```
curl -X  "POST" "http://localhost:8080/api/SQLFiles/Add?programming_langague=pgsql" ^
  -H "accept: */*" ^
  -H "Content-Type: multipart/form-data" ^
  -F files="@C:\\your directory\\your sub directory\\file1.pgsql" ^
  -F files="@C:\\your directory\\your sub directory\\file2.pgsql" 
```

**Step 3-Add Data Source**

```
curl -X "POST" ^
  "http://localhost:8080/api/DataSources/Add" ^
  -H "Content-Type: application/json" ^
  -d "{  \"database_type\": \"POSTGRES\",  \"source_uid\": \"[source db username]\",  \"source_pwd\": \"[source db password]\",  \"source_database_name\": \"[source db name]\",  \"source_server\": \"[source server address]\",    \"source_port\": \"5432\",    \"simulated_uid\": \"[pod db username]\",  \"simulated_pwd\": \"[pod db password]\",  \"simulated_database_name\": \"postgres\",      \"simulated_server\": \"postgres\",    \"simulated_port\": \"5432\"  }"
```

**Step 4 - Test Data Source(optional)**

```
curl -X "POST" ^
  "http://localhost:8080/api/DataSources/TestConnection" ^
  -H "accept:  text/plain" 
```

**Step 5-Perform Preview Merge.  You also have the option of doing a DryRun or PostviewMerge.**

```
curl -X "GET" ^
  "http://localhost:8080/api/Run/PreviewMerge" ^
  -H "accept:  text/plain" 
```
