Skip to content

Instantly share code, notes, and snippets.

@afalciano
Created October 9, 2011 12:04
Show Gist options
  • Save afalciano/1273596 to your computer and use it in GitHub Desktop.
Save afalciano/1273596 to your computer and use it in GitHub Desktop.
Sample OpenXX initialization file showing how to use GDAL utilities
[Commands]
0.Type=0
0.AssociateWith=3
0.Title="Open Command Prompt"
0.Program="%OpenXXApp%"
0.Arguments="OpenCommandPrompt %FilePaths%"
0.WorkingDir=""
0.Icon="%OpenXXDll%,-101"
0.FileTypes=""
1.Type=0
1.AssociateWith=0
1.Title="Copy Path"
1.Program="%OpenXXApp%"
1.Arguments="CopyPath %FilePaths%"
1.WorkingDir=""
1.Icon="%OpenXXDll%,-102"
1.FileTypes=""
2.Type=0
2.AssociateWith=0
2.Title="Change Properties"
2.Program="%OpenXXApp%"
2.Arguments="ChangeProperties %FilePaths%"
2.WorkingDir=""
2.Icon="%OpenXXDll%,-103"
2.FileTypes=""
3.Type=0
3.AssociateWith=2
3.Title="Create Sub Folder"
3.Program="%OpenXXApp%"
3.Arguments="CreateSubFolder %FilePaths%"
3.WorkingDir=""
3.Icon="%OpenXXDll%,-104"
3.FileTypes=""
4.Type=0
4.AssociateWith=1
4.Title="View File Checksum"
4.Program="%OpenXXApp%"
4.Arguments="ViewFileChecksum %FilePaths%"
4.WorkingDir=""
4.Icon="%OpenXXDll%,-105"
4.FileTypes=""
5.Type=0
5.AssociateWith=4
5.Title="Run With Arguments"
5.Program="%OpenXXApp%"
5.Arguments="RunWithArguments %FilePaths%"
5.WorkingDir=""
5.Icon="%OpenXXDll%,-106"
5.FileTypes="*.exe;*.lnk"
6.Type=0
6.AssociateWith=1
6.Title="Register DLL"
6.Program="%OpenXXApp%"
6.Arguments="RegisterDLL %FilePaths%"
6.WorkingDir=""
6.Icon="%OpenXXDll%,-107"
6.FileTypes="*.dll;*.ocx"
7.Type=0
7.AssociateWith=1
7.Title="Unregister DLL"
7.Program="%OpenXXApp%"
7.Arguments="UnregisterDLL %FilePaths%"
7.WorkingDir=""
7.Icon="%OpenXXDll%,-108"
7.FileTypes="*.dll;*.ocx"
8.Type=0
8.AssociateWith=1
8.Title="Copy Shortcut Target"
8.Program="%OpenXXApp%"
8.Arguments="CopyShortcutTarget %FilePaths%"
8.WorkingDir=""
8.Icon="%OpenXXDll%,-109"
8.FileTypes="*.lnk"
9.Type=0
9.AssociateWith=4
9.Title="Find Shortcut Target"
9.Program="%OpenXXApp%"
9.Arguments="FindShortcutTarget %FilePaths%"
9.WorkingDir=""
9.Icon="%OpenXXDll%,-110"
9.FileTypes="*.lnk"
10.Type=1
11.Type=0
11.AssociateWith=4
11.Title="Notepad"
11.Program="notepad.exe"
11.Arguments="%FilePaths%"
11.WorkingDir=""
11.Icon=""
11.FileTypes=""
12.Type=0
12.AssociateWith=4
12.Title="Paint"
12.Program="mspaint.exe"
12.Arguments="%FilePaths%"
12.WorkingDir=""
12.Icon=""
12.FileTypes="*.bmp;*.jpg;*.jpeg;*.jpe;*.jfif;*.gif;*.tif;*.tiff;*.png"
13.Type=1
14.Type=0
14.AssociateWith=4
14.Title="GDALinfo"
14.Program="%ComSpec%"
14.Arguments="/k gdalinfo %FilePaths%"
14.WorkingDir="%FileDir%"
14.Icon=""
14.FileTypes="*.bmp;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.sid;*.ecw;*.asc"
15.Type=0
15.AssociateWith=4
15.Title="Convert to JPEG"
15.Program="%ComSpec%"
15.Arguments="/c for %i in (%FilePaths%) do start gdal_translate -of JPEG %~nxi %~ni.jpg"
15.WorkingDir="%FileDir%"
15.Icon=""
15.FileTypes="*.bmp;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.sid;*.ecw;*.asc"
16.Type=0
16.AssociateWith=0
16.Title="Convert to JPEG (batch)"
16.Program="%ComSpec%"
16.Arguments="/c for %i in (%FilePaths%) do start gdal_translate -of JPEG %~nxi %~ni.jpg"
16.WorkingDir="%FileDir%"
16.Icon=""
16.FileTypes="*.bmp;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.sid;*.ecw;*.asc"
17.Type=1
18.Type=0
18.AssociateWith=0
18.Title="Customize Open++"
18.Program="%OpenXXApp%"
18.Arguments=""
18.WorkingDir=""
18.Icon="%OpenXXDll%,-111"
18.FileTypes=""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment