Last change
on this file since 164 was 164, checked in by coas-nagasima, 8 years ago |
TOPPERS/ECNLサンプルアプリ「USB充電器電力計」を追加
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id
-
Property svn:mime-type
set to
text/javascript
|
File size:
1001 bytes
|
Rev | Line | |
---|
[164] | 1 | var fs = WScript.CreateObject("Scripting.FileSystemObject");
|
---|
| 2 |
|
---|
| 3 | args = WScript.Arguments;
|
---|
| 4 |
|
---|
| 5 | if(args.length >= 2)
|
---|
| 6 | {
|
---|
| 7 | var src_file = args(0);
|
---|
| 8 | var dst_file = args(1);
|
---|
| 9 |
|
---|
| 10 | if(fs.FileExists(src_file))
|
---|
| 11 | {
|
---|
| 12 | if(fs.FileExists(dst_file))
|
---|
| 13 | {
|
---|
| 14 | var src = fs.GetFile(src_file);
|
---|
| 15 | var dst = fs.GetFile(dst_file);
|
---|
| 16 |
|
---|
| 17 | if(src.DateLastModified > dst.DateLastModified)
|
---|
| 18 | {
|
---|
| 19 | fs.CopyFile(src_file, dst_file, true);
|
---|
| 20 |
|
---|
| 21 | WScript.StdOut.Write(dst_file);
|
---|
| 22 | WScript.StdOut.WriteLine("ðRs[µÜµ½B");
|
---|
| 23 | }
|
---|
| 24 | }
|
---|
| 25 | else
|
---|
| 26 | {
|
---|
| 27 | fs.CopyFile(src_file, dst_file);
|
---|
| 28 |
|
---|
| 29 | WScript.StdOut.Write(dst_file);
|
---|
| 30 | WScript.StdOut.WriteLine("ðRs[µÜµ½B");
|
---|
| 31 | }
|
---|
| 32 | }
|
---|
| 33 | else
|
---|
| 34 | {
|
---|
| 35 | if(fs.FileExists(dst_file))
|
---|
| 36 | {
|
---|
| 37 | var dst = fs.GetFile(dst_file);
|
---|
| 38 |
|
---|
| 39 | fs.DeleteFile(dst_file);
|
---|
| 40 |
|
---|
| 41 | WScript.StdOut.Write(dst_file);
|
---|
| 42 | WScript.StdOut.WriteLine("ðíµÜµ½B");
|
---|
| 43 | }
|
---|
| 44 | else
|
---|
| 45 | {
|
---|
| 46 | WScript.StdOut.WriteLine("wè³ê½t@Cª èܹñB");
|
---|
| 47 | WScript.StdOut.WriteLine(src_file);
|
---|
| 48 | WScript.StdOut.WriteLine(dst_file);
|
---|
| 49 | }
|
---|
| 50 | }
|
---|
| 51 | }
|
---|
| 52 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.