Currently I save files to the absolute file path `SAVE OUTFILE='my/path/to/file.sav'`. This is not optimal, so I would like to save files to dynamic/relative file paths like `SAVE OUTFILE='file.sav'`.

So I need to set current directory, but this works as above as well `CD 'my/path/to/'` and then save. But I am wondering if SPSS can't set directory automatically when opening files? We are usually a lot of people working with same syntaxes and we will always have to change the absolute file paths.

Edit: As Jignesh Sutar have stated I can as well use python extension. So I thought I could use something simple like: 

```
BEGIN PROGRAM.
import spss,spssaux, os, SpssClient
SpssClient.StartClient() 

path = SpssClient.GetCurrentDirectory()
print path
spss.Submit(r"""CD = '%s'.""" % (path))
SpssClient.StopClient()
END PROGRAM.

```

But above will actually just output the script and nothing else, however, another simple case would be: 

```
BEGIN PROGRAM.
import spss
firstvar=spss.GetVariableName(0)
print firstvar
END PROGRAM.

```

And this is indeed working fine.