[Pythonmac-SIG] move/rename files w resource forks

Bob Ippolito bob at redivi.com
Mon Nov 15 18:51:44 CET 2004


On Nov 15, 2004, at 7:44 PM, Paul Berkowitz wrote:

> On 11/15/04 9:36 AM, "brad.allen at omsdal.com" <brad.allen at omsdal.com> 
> wrote:
>
>>
>> Paul Berkowitz wrote:
>>
>>> ditto -rsrc
>>>
>>> will copy files complete with resource forks, on all Macs - no 
>>> special
>> tools
>>> required. Then rm the original.
>>
>> Yes, that's great for copying, but not for move/rename. In this case, 
>> until
>> I have implemented a better way, I'm using ditto as a very inefficient
>> "move" by deleting files from one directory and using ditto -rsrc to 
>> copy
>> to a different directory.
>
> But that's exactly what 'move' commands do behind the scenes anyway - 
> copy
> and delete original. It's not in the least inefficient doing it 
> explicitly
> yourself - it's just one more line of code to rm. It's a minor 
> nuisance for
> renaming.

Uh, wrong.  At least not if the target and destination are on the same 
filesystem.

Copy/Remove breaks aliases and hard links.  Move does not.

-bob



More information about the Pythonmac-SIG mailing list