mercredi 25 février 2015

Moving symlinks generated in Python from Mac to Windows server

I have a lot of symlinks that were created in Python with the os.symlink() command on a Mac server. The directories these symlinks are pointing to are also hosted on the same Mac server. I need to move these directories and symlinks to a Windows server. When I try the symlinks still work fine for Mac clients after the move but not for Windows 7 clients.


If I try creating new symlinks on the new Windows server with the os.symlink() command from a Mac they are also broken for Win7 clients.


However, if I try creating new symlinks on the new Windows server with the Windows mklink command the resulting new symlinks will work for both Mac and Win7 clients. So, this would seem to be the solution except the current system that generates symlinks is part of a much larger system that is hosted and run on a different Mac server. In short, moving symlink generating to a Windows machine would be a large undertaking.


My goal: I would like to preserve these existing symlinks and find some way to generate new ones from within Python (on a Mac) that works for both Mac and Win7 clients. Like I said, the existing symlinks generated in this way do work for Win7 clients but only when hosted on a Mac server.


Do I have a chance at making this happen?


Edit: Or, to ask more simply: is it possible for a Unix machine (like a Mac) to remotely generate Windows compatible symlinks via Python on a Windows machine.


Aucun commentaire:

Enregistrer un commentaire