-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
105 lines (73 loc) · 3.93 KB
/
README
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
This program (filecopier) is a small utility which automatically transfers
files from one or more monitored folder trees, to remote copies of those
folder trees.
The intention is that you can work on files on your local PC but they are
immediately also copied to a remote server (via Windows share or similar
mechanism) as soon as you change anything. This has the following advantages
compared to working directly on the remote server:
* Read-only work, such as searches, happens on your local PC only and may be
faster.
* If the remote server is sometimes unavailable, you can continue to work on
your files locally.
* In case of hardware failure (of either your machine or the local server) you
now have an ad-hoc backup of all files.
SYSTEM REQUIREMENTS
* Requires Java 7+.
* Works on Windows.
* Also intended to work on any Java 7 platform (Linux, Mac), but this has not
been fully tested and it uses a slightly different mechanism.
USAGE INSTRUCTIONS
You can download filecopier.jar by using the Branch dropdown above to switch
to 'gh-pages'; then you'll see the binary file. (I hope there might be an
easier way to download it eventually.)
Note that the file is actually called filecopier.1.0.jar but I am referring to
it as filecopier.jar for simplicity.
* Configuration
Create a file called .filecopier in your user home folder which contains one
or more lines like:
c:\source\folder => \\server\target\folder
- The target doesn't have to be on a Windows share, it can be any folder.
- Both source and target folders must exist.
- On non-Windows platforms, use forward slashes as normal.
- If there are any special characters, this file should have UTF-8 encoding.
You can also enable debugging by adding this as the first line of the
.filecopier file:
debug => true
This will output extra information in the event of an error, and log events
to ~/.filecopier.debug.log.
* Initial usage
Double-click on filecopier.jar to run it. It starts minimised, but you can
bring the window back to see what is happening.
If the target folder is not already a copy of the source folder, you should
recopy the entire folder to ensure that it is in synch. You can do this by
right-clicking in the filecopier.jar window and choosing 'Wipe and re-copy'
for each folder.
* Usage
Any file that you change in the source folder will be changed in the
target folder. This applies to all nested folders.
- EXCEPTION: Folders named '.git' (and anything within them) are not
transferred. (This is currently a hard-coded exception and can't be
configured.)
- If there are files that are out of synch (because you forgot to have
filecopier running while you made some changes), you may see errors. The
safest way to fix these is to use 'wipe and re-copy' again.
- When the system prints an 'ERROR' message, the corresponding Java exception
trace is usually printed to standard error. If you want to see these, you
can run the jar file using 'java -jar filecopier.jar' from a command line
instead of double-clicking it.
- The application does not attempt to copy multiple files simultaneously.
For example, if you do a 'wipe and re-copy', nothing else will be updated
until that finishes. Changes will be stored in memory in the meantime.
- If you quit the application while it is still busy, the target folder may
get out of synch and you may need to 'wipe and re-copy' next time.
* Setup
It is probably a good idea to ensure the program always runs so that your
folders don't get out of synch.
- On Windows, you can just drop the filecopier.jar into your startup folder.
BUILD INSTRUCTIONS
In Eclipse, you can build this by double-clicking on 'buildjar.jardesc'. I was
too lazy to make an ant script but it is rather trivial (just jar up the files
and the icon).
CREDITS
- Code by sam marshall for the Open University.
- Icon from http://www.icon-king.com/projects/nuvola/ licensed under LGPL-2.1