OpenBabel on Windows

From Open Babel
Revision as of 07:12, 16 January 2007 by Baoilleach (Talk | contribs) (Initial creation of a Docs page for Windows users of Open Babel)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a place holder for the forthcoming documentation page on using OpenBabel in Windows. It will be linked to from the Install Page. It will contain links to other relevant pages, as well as Tips'n'Tricks for Windows users.

Automating file conversions using Drag'n'Drop

This section describes how automate file format conversion simply by dragging an input file onto a target on your desktop.

(1) Start Notepad, and enter the following text:

@echo off
set convertto=sdf
echo Converting %~nx1 to %convertto% format
set outputfilename="%~np1.%convertto%"
babel.exe %1 %outputfilename%
pause

(2) Save this file on your desktop as babel2sdf.bat. Make sure that the file extension is .bat and not .txt.

(3) If you drag and drop an inputfile onto babel2sdf.bat, babel will create an SDF output file of the same name. The output file will be created in the same directory as the inputfile.

(4) If you don't like 'pressing any key to continue', remove the "pause" line in babel2sdf.bat.