Results 1 to 10 of 10
Thread: Hello
- 01-16-2009, 07:24 AM #1
Member
- Join Date
- Jan 2009
- Posts
- 1
- Rep Power
- 0
- 01-16-2009, 09:08 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Hi Chintan,
Welcome to our community.
Please read our FAQ page before posting again. It's really helpful to you. You have introduce to the forum in wrong section. I'll move this thread to the correct place this time. Please choose the correct one next time.
- 01-17-2009, 05:02 AM #3
Member
- Join Date
- Jan 2009
- Posts
- 9
- Rep Power
- 0
Java Buzzer
Hello Everyone!!!:)
- 01-17-2009, 06:33 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 01-19-2009, 04:44 PM #5
Member
- Join Date
- Jan 2009
- Posts
- 9
- Rep Power
- 0
My pleasure..
- 01-19-2009, 04:47 PM #6
Member
- Join Date
- Jan 2009
- Posts
- 9
- Rep Power
- 0
hey,
i have create a program which i can copy the image file in a specific folder. In this case whenever i run the program every time the copied image was replace by a new one i just want to append the copied image without replacement. How could i do this. Any idea??
thx..
- 01-20-2009, 02:37 AM #7
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
If you are using the same name, replacement cannot stop. Can you show how done it?
- 01-20-2009, 06:45 AM #8
Member
- Join Date
- Jan 2009
- Posts
- 9
- Rep Power
- 0
sure..
he is the code i had used
try {
String s2=fd.getDirectory ( ) + fd.getFile ( ) ;
String paa=fd.getFile ( ) ;
//String path1=fd.getDirectory ( );
String path1="D:training\\";
boolean sucess=new File((path1)).mkdir();
/////////////////////////////////
try{
File f1 = new File(s2);
String dtFile=path1+"file1.jpg";
File f2 = new File(dtFile);
FileInputStream in = new FileInputStream(f1);
//For Overwrite the file.
FileOutputStream out = new FileOutputStream(f2);
///////////////////////////////////////////////////////////////////
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) >0){
out.write(buf,0,len);
//ic.transferTo(0,ic.size,oc);
}
in.close();
out.close();
System.out.println("File copied.");
}catch(FileNotFoundException ex){
System.out.println(ex.getMessage() + " in the specified directory.");
System.exit(0);
}
- 01-20-2009, 08:30 AM #9
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Yes in that way your file have overwrite.
- 01-20-2009, 11:06 AM #10
Member
- Join Date
- Jan 2009
- Posts
- 9
- Rep Power
- 0


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks