:: reverse dictionary ::
指定した日付以降に更新したファイルのみをコピーするには、xcopy コマンドに次の3つを指定して実行します。
D:ディレクトリ F:ファイル [更新日付] D C:\MyDir ├ F sample01.txt 2005/04/01 ├ F sample02.txt 2005/04/02 ├ F sample03.txt 2005/04/03 ├ D SubDir │ └ F sample04.txt 2005/04/04 └ D SubDir2 ├ F sample01.txt 2005/04/01 └ F sample02.txt 2005/04/01
例えば /d:04-02-2005 を指定すると、2005年4月2日以降に更新されたファイルのみをコピーします。
C:\>xcopy C:\MyDir\sample??.txt C:\MyDir\SubDir /d:04-02-2005 C:\MyDir\sample02.txt C:\MyDir\sample03.txt 2 個のファイルをコピーしました C:\>dir C:\MyDir\SubDir\sample??.txt /b sample02.txt sample03.txt sample04.txt
xcopy 送り側 [受け側] [/d[:日付]]
xcopy コマンドに /d スイッチと日付を付けると、その日付以降に更新したファイルのみをコピーします。
日付の書式は「月-日-年」( mm-dd-yyyy )です。
日付を省略した場合は、送り側の日付が受け側の日付より新しいファイルのみをコピーします。(受け側に存在しないファイルもコピー)
C:\>xcopy C:\MyDir\sample??.txt C:\MyDir\SubDir2 /d
C:\MyDir\SubDir2\sample02.txt を上書きしますか (Yes/No/All)? Y
C:\MyDir\sample02.txt
C:\MyDir\sample03.txt
2 個のファイルをコピーしました
C:\>dir C:\MyDir\SubDir2\sample??.txt
ドライブ C のボリューム ラベルがありません。
ボリューム シリアル番号は A1B2-C3D4 です
C:\MyDir\SubDir2 のディレクトリ
2005/04/01 01:00 218 sample01.txt
2005/04/02 02:00 42,138 sample02.txt
2005/04/03 03:00 55,686 sample03.txt
3 個のファイル 98,042 バイト
0 個のディレクトリ 98,765,432,100 バイトの空き領域
| dir | … | ディレクトリの詳細を表示する |
| dir /b | … | ディレクトリとファイルの名前のみを表示する |
Copyright (C) 2005-2007 Noto Watabe. All rights reserved.
e-mail:wmh@always-pg.com