Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- 코로나백신이상증상
- 크롬 인터넷연결
- windows10 cisco vpn
- 안드로이드폰 위치
- windows10 크롬
- 윈도우10 vpn
- cisco vpn
- Windows10
- 핸드폰 찾기
- 크롬 타임아웃
- 10원단위 올림
- 코로나백신
- 코로나백신 갈증
- 크롬 인너넷연결 안됨
- 신주쿠 로컬식당
- 분기날짜
- takanaru
- 로니세라
- 노리로또
- 강화 프로방스
- 코로나백신 어지러움
- 신주쿠맛집
- 10 올림
- 타카마루
- 코로나백신 부작용
- 성수족발
- 응용 프로그램 내 구입
- 화이자백신
- 오라클
- 랍스터 찜
Archives
- Today
- Total
이거 맘대로 되는 세상이 아니구만...
Stream6(파일명 변경) 본문
반응형
▶ 파일명 변경
renameTo()를 이용해서 파일명을 변경한다.
.....................................................................................
File f=new File("원본파일명");
File f1=new File("변경할 파일명");
if(f.exists()){
f.renameTo(t);
}
.....................................................................................
import java.io.*;
public class kkk{
public static void main(String args[]) throws IOException{
File f=new File("kihong.java");
File f1=new File("kihong79.java");
if(f.exists()){
f.renameTo(f1);
System.out.println("파일이름이 바뀌었습니다 ");
}
}
}
renameTo()를 이용해서 파일명을 변경한다.
.....................................................................................
File f=new File("원본파일명");
File f1=new File("변경할 파일명");
if(f.exists()){
f.renameTo(t);
}
.....................................................................................
import java.io.*;
public class kkk{
public static void main(String args[]) throws IOException{
File f=new File("kihong.java");
File f1=new File("kihong79.java");
if(f.exists()){
f.renameTo(f1);
System.out.println("파일이름이 바뀌었습니다 ");
}
}
}
Comments