The Artima Developer Community
Sponsored Link

Java Answers Forum
File path question

1 reply on 1 page. Most recent reply: May 25, 2003 5:42 AM by Singh M.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
shon

Posts: 42
Nickname: shon
Registered: Apr, 2003

File path question Posted: May 24, 2003 9:05 PM
Reply to this message Reply
Advertisement
If i were to saves a file in the folder \data in the same directory as the java file ... how to proceed the code//

example :
File newFile =new File(" sample.txt ");

how can i save the sample.txt into folder data ?
\data\sample.txt

thanks for answering


Singh M.

Posts: 154
Nickname: ms
Registered: Mar, 2002

Re: File path question Posted: May 25, 2003 5:42 AM
Reply to this message Reply
> If i were to saves a file in the folder \data in the same
> directory as the java file ... how to proceed the code//
>
> example :
> File newFile =new File(" sample.txt ");
>
> how can i save the sample.txt into folder data ?
> \data\sample.txt
>
> thanks for answering

File newFile =new File(" data\\sample.txt ");

Flat View: This topic has 1 reply on 1 page
Topic: Getting FileNotFoundException on WAS 5.0 Previous Topic   Next Topic Topic: how to call a java exe file from a webserver??

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use