Copy changed files to a local directory?

Hello,

I'm developing a non-web application, that is it is a plugin for a tool called MySQL Workbench. This application's plugin files reside under (in Windows)

C:\Users\{MyUserName}\AppData\Roaming\MySQL\Workbench\modules

However, my project files are stored under

C:\projects\wbplugins\jpaexport\ ...

Question:

How can I copy changed files from the projects directory to a another local directory more or less automatically after the files have changed, so when I restart MySQL Workbench I don't have to make another iteration copying the files there manually?

Is there a way to do it with the PyCharm Community Ed.?

Karsten
4 comments
Comment actions Permalink
How about making a symlink so that you don't need to copy at all?
0
Comment actions Permalink
Is this an approved/tested approach? On Windows, creating a symbolic link to a file

C:\Users\{MyUserName}\AppData\Roaming\MySQL\Workbench\modules\generator\engine.py

creates a file name in Windows Explorer showing up as engine.py with a link symbol in the lower left, but when restarting PyCharm it sees a file called engine.py.lnk, which it doesn't know how to handle.

See images below.

Windows Explorer:

explorer-symlink.png

PyCharm Symlink:

pycharm-symlink.png

Trying to open that file will pop up PyCharm's file type association dialog:


pycharm-fileassoc.png

It looks like a will have to write some *.BAT file to clear the target dir and copy all the new stuff there...

Karsten
0
Comment actions Permalink
Don't create .lnk file but real symlink. See http://superuser.com/questions/197273/ for example.
0
Comment actions Permalink
Ehrm... nice one. I've never heard of real symlinks with mklink in Windows before. Amazing.

It works like a (Py)charm ;-) thanks for the tip! (put the symlinks into the C:\Users\Kawu\AppData\Roaming\MySQL\Workbench\modules Workbench dir and leave the actual source files in the C:\projects\wbplugins\jpaexport\)

Thanks a million for this!
0

Please sign in to leave a comment.