Getting Current Working Directory
#!/bin/sh
cd "$1/.."
echo $PWD
mkdir TestDir
cd "$1/.."
echo $PWD
mkdir TestDir
Wrappping this shell script with Platypus will create an application that creates a directory called "TestDir" in the same directory as the application itself. The $1 variable contains the path to the application folder itself (i.e.
/the/path/to/theApp.app). The following code cd "$1/.." will change the current working directory to the directory containing the application.