Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #7369

How to append "test" to a filename (after path and before extension)?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail
From jochen2@brenz.com (Jochen Brenzlinger)
Newsgroups comp.lang.java.programmer
Subject How to append "test" to a filename (after path and before extension)?
Followup-To comp.lang.java.programmer
Date 25 Aug 2011 09:50:33 GMT
Lines 13
Message-ID <4e561ae9$0$7610$9b4e6d93@newsspool1.arcor-online.net> (permalink)
Organization Arcor
NNTP-Posting-Date 25 Aug 2011 11:50:33 CEST
NNTP-Posting-Host 8e7caf2f.newsspool1.arcor-online.net
X-Trace DXC=>fHiok;nKBM78PK[oJ2ng@ic==]BZ:afN4Fo<]lROoRA<`=YMgDjhgB8SfeWLo@G[KQL4QcO2CM4A9AW^;nKDM<O_n4E:CYZ`mFDO__RgMRFdN
X-Complaints-To usenet-abuse@arcor.de
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7369

Followups directed to: comp.lang.java.programmer

Show key headers only | View raw


Let's start with a filename which is stored in a String variable e.g.

String fn = "D:\project\java\testproj\log2011.log"

I want to append "test" to the file basename but keep path and extension.
The resulting filename for the example above should be:

string fn2 = "D:\project\java\testproj\log2011test.log"

How can I do this programmatically from Java?

Jochen

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar


Thread

How to append "test" to a filename (after path and before extension)? jochen2@brenz.com (Jochen Brenzlinger) - 2011-08-25 09:50 +0000
  Re: How to append "test" to a filename (after path and before extension)? Robert Klemme <shortcutter@googlemail.com> - 2011-08-25 13:02 +0200
  Re: How to append "test" to a filename (after path and before extension)? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-08-25 07:30 -0400

csiph-web