oga's tools
Revision | 8fe696805b25170f69489c5da13dc9835228894b (tree) |
---|---|
Zeit | 2014-01-15 05:47:46 |
Autor | oga <hyperoga@gmai...> |
Commiter | oga |
V1.21 14/01/15 support -nr
@@ -23,6 +23,7 @@ | ||
23 | 23 | * V1.18 11/03/14 support -c (Same File Check in copy) for -t(test mode) |
24 | 24 | * V1.19 11/12/06 change default r/w buffer size for perf and support -b |
25 | 25 | * V1.20 11/12/09 support -ca compare all file for -t(test mode) |
26 | + * V1.21 14/01/15 support -nr | |
26 | 27 | * |
27 | 28 | * Known Bug |
28 | 29 | * 07/04/31 Long UNC(upper 256) => app error (WinNT stat() unsupport?) |
@@ -53,7 +54,7 @@ | ||
53 | 54 | #include <utime.h> |
54 | 55 | #endif /* _WIN32 */ |
55 | 56 | |
56 | -#define VER "1.20" | |
57 | +#define VER "1.21" | |
57 | 58 | |
58 | 59 | #define dprintf if (vf) printf |
59 | 60 | #define dprintf2 if (vf >= 2) printf |
@@ -127,11 +128,12 @@ void usage() | ||
127 | 128 | #else |
128 | 129 | /* -f, -r をデフォルトONとする */ |
129 | 130 | printf("dsync Ver %s\n", VER); |
130 | - printf("usage: dsync [{-d|-m}] [-f] [-i <sec>] [-e <file_dir>] [-l <log_file>] [-s <daily_start_time(HH:MM)>] [-v] [-t [-c]] <src_dir> <dest_dir>\n"); | |
131 | + printf("usage: dsync [{-d|-m}] [-f] [-nr] [-i <sec>] [-e <file_dir>] [-l <log_file>] [-s <daily_start_time(HH:MM)>] [-v] [-t [-c[a]]] <src_dir> <dest_dir>\n"); | |
131 | 132 | #endif |
132 | 133 | printf(" -d : delete deleted file\n"); |
133 | 134 | printf(" -m : sync directories mutually. \n"); |
134 | 135 | printf(" -f : force copy read only file\n"); |
136 | + printf(" -nr: sync no recursive\n"); /* V1.21-A */ | |
135 | 137 | printf(" -i : ignore time difference (default:2(sec))\n"); |
136 | 138 | printf(" -e : ignore specific file or dir (max:%d)\n", MAX_IGNORE); /* V1.09-A */ |
137 | 139 | printf(" -s : daily start time\n"); /* V1.16-A */ |
@@ -235,6 +237,10 @@ int main(int a, char *b[]) | ||
235 | 237 | rf = 1; |
236 | 238 | continue; |
237 | 239 | } |
240 | + if (!strncmp(b[i],"-nr",3)) { /* V1.21-A */ | |
241 | + rf = 0; | |
242 | + continue; | |
243 | + } | |
238 | 244 | if (!strncmp(b[i],"-f",2)) { |
239 | 245 | ff = 1; |
240 | 246 | continue; |