Mark,
> I just put a tip on fmepedia about using the Windows folder options to
> enable a right-click transformation in Explorer. Basically I add the
> following command to the DGN file extension...
>
> cmd.exe /k call "C:\Program Files\FME\fme.exe" GENTRANS IGDS "%1" ACAD
> FMEgentrans.dxf
>
> It works OK, but I'd prefer the output to be the same name as the
> input, just a different extension. But if I use...
>
> ....IGDS "%1" ACAD "%1".dxf
>
> I get <filename>.dgn.dxf as the output, and I don't really want the
> ".dgn" part. In theory the call command should allow me to use...
>
> ....IGDS "%1" ACAD "%~pn1".dxf
>
> to give just the path and filename. However, it doesn't appear to work
> from the Windows folder options (does work entered directly into DOS).
>
> So, my question is, does anyone know how to resolve the "%~pn1"
> problem in Windows, or does anyone know a different DOS command or
> function that will return the filename without an extension?
I don't know about plain DOS, as I only use Take Command (a command-line
replacement by JPSoft, see www.jpsoft.com). Take Command has a @FIELD
function which can split a string into smaller parts. I haven't really
been able to get this to work yet, and I'm not sure whether plain old
DOS has a similar option.
Alternatively, could you include the call to FME in a batch file and
them simply add a rename command in there?
ren *.dgn.dxf *.dxf
would do the trick
--
Hans van der Maarel
Red Geographics
www.redgeographics.com / [EMAIL PROTECTED]
Get the maximum benefit from your FME, FME Objects, or SpatialDirect via our
Professional Services team. Visit www.safe.com/services for details.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/fme/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/