Article View: borland.public.jbuilder.java.language
Article #19314Re: File Copy
From: Rich Wilkman
Date: Thu, 19 Feb 1998 00:00
Date: Thu, 19 Feb 1998 00:00
34 lines
1397 bytes
1397 bytes
James:
Try Runtime.exec("c:\command.com /c copy file1 file2")
You may or may not need the call to command.com
-Rich
James D. Frentress wrote:
>
> It's a bit embarrasing but for the life of me I can't find a one-liner
> to copy a disk file in Java (copy c:\myFile.txt to e:\myFile.txt). Of
> course I can read/write the file or make a System shell call but there
> must be a cleaner way.
>
> tia
>
> Jim
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rich Wilkman
Senior Quality Assurance Engineer
Borland JBuilder Team
If you see something that looks like an opinion up there,
it's mine and mine alone.
Mail sent to me from the newsgroups won't bounce but will
be ignored. If I have time, I'll respond, but you have
a better chance if you confine your posts to the newsgroups
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<34EC643E.3875607@corp.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34EB98D0.26C6EB8B@ForAWhile.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,e4e7d7ce877368e7 X-Google-Attributes: gidf74b3,public From: Rich Wilkman <rwilkman@corp.borland.com> Subject: Re: File Copy Date: 1998/02/19 Message-ID: <34EC643E.3875607@corp.borland.com> X-Deja-AN: 326642983 Content-Transfer-Encoding: 7bit References: <34EB98D0.26C6EB8B@ForAWhile.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: None Newsgroups: borland.public.jbuilder.java.language