This is a simple commandline Java utility which I wrote down in under 5 minutes to help in checking-in (svn commit) over 500 files which were modified but the dates weren’t changed due to an error in our settings. 이것은 간단한 커맨드 자바 유틸리티 그것이 도움이 5 분, 아래에 적어 점검 -은 (svn 커밋) 파일을 500 개 이상의 날짜가 바뀌었습니다하지만 오류로 인해이의 설정을 변경되지 않습니다. So subversion failed to recognize it. 그래서 파괴를 인식하지 못했습니다. Anyway this simple utility updates the timestamp of any file(s) and directories recursively to current time . 어쨌든이 간단한 유틸리티를 업데이 트의 타임 스탬프 어떤 파일 (들)과 디렉토리에 현재 시간을 반복합니다. It is extremely fast and cross-platform. 그것은 매우 신속하고 크로스 - 플랫폼합니다. It does one job and does it well. 그것이 한 일과는 아주 잘합니다. It is named after the unix utility touch , with similar functionality. 그것의 이름은 이후에 유닉스 유틸리티를 만지지과 유사한 기능을합니다.

 import java.io.File;  /** Super-fast file / directory(recursive) touch. 수입 java.io.file; / ** 슈퍼 - 빠른 파일 / 디렉토리 (재귀) 터치합니다. *  It doesn't ask for confirmation. *하지 않습니다 확인을 요청하십시오. *  Arguments: File / Directories to touch to current time. * 인수 : 파일 / 디렉토리를 만져을 현재 시간을합니다. */ public class Touch {     public static void main(String ... args) {         long time = System.currentTimeMillis();         for(String fileName:args) touch(new File(fileName), time);     }      /** Recursively touch file and directories. * / 공용 클래스 터치 (공공 정적 무효 메인 (문자열 ... args) (긴 시간 = system.currenttimemillis ();을 (문자열 파일 이름 : args) 터치 (새 파일 (파일명), 시간);) / ** 재귀 터치 파일 및 디렉토리를합니다. *  @param File (file or directory) for touching. * @ param 파일 (파일 또는 디렉토리)에 감동합니다. */     public static void touch(File file, long time) {         if(file.isDirectory()) for(File childFile:file.listFiles()) touch(childFile, time);         file.setLastModified(time);     } } * / 공공 정적 무효 터치 (파일을 파일, 긴 시간) (경우 (file.isdirectory ())을 (파일 childfile : file.listfiles ()) 터치 (childfile, 시간); file.setlastmodified (시간);)) 

You can also download the 또한 다운로드하실 수있습니다 java executable class file 자바 실행 파일 클래스 파일 . 합니다. You can run it as follows: 다음과 같이 실행할 수있습니다 :
java -classpath . 자바 - 클래스합니다. Touch *.html 터치 *. html

Replace *.html with file name(s) and directories you want to update. *. html과 파일 이름을 바꿉니다 (시내)과 디렉토리를 업데이 트합니다. This requires JDK 1.5 or later. jdk 1.5 이상이 필요합니다.