However, note that on native windows /dir/filename is not an absolute path and the script would fail to replace it with the full path.
OK. The updated script (will be committed soon) uses a more complicated algorithm, and handles this situation as well. I.e, cygwin/*nix: $ cat rose.fig #FIG 3.2 Produced by xfig version 3.2.5-alpha5 Portrait Center Metric A4 100.00 Single -2 1200 2 2 5 0 1 0 -1 50 -1 -1 0.000 0 0 -1 0 0 5 0 figs/rose.png 1125 2250 2653 2250 2653 4150 1125 4150 1125 2250 $ python fig_copy.py rose.fig try/rose.fig; cat try/rose.fig #FIG 3.2 Produced by xfig version 3.2.5-alpha5 Portrait Center Metric A4 100.00 Single -2 1200 2 2 5 0 1 0 -1 50 -1 -1 0.000 0 0 -1 0 0 5 0 /cygdrive/d/My Documents/figs/rose.png 1125 2250 2653 2250 2653 4150 1125 4150 1125 2250 windows command line: D:\My Documents>type try\rose2.fig #FIG 3.2 Produced by xfig version 3.2.5-alpha5 Portrait Center Metric A4 100.00 Single -2 1200 2 2 5 0 1 0 -1 50 -1 -1 0.000 0 0 -1 0 0 5 0 D:\My Documents\figs\rose.png 1125 2250 2653 2250 2653 4150 1125 4150 1125 2250 Bo