Problem with moving files

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Re: Problem with moving files Sun Jan 19, 2014 9:58 am • by Tomer1749
?
Tomer1749
 
Posts: 9
Joined: Mon Dec 16, 2013 12:42 pm

Re: Problem with moving files Mon Jan 20, 2014 4:20 pm • by Mr_Noodle
It seems to me that something is interfering. While Hazel might not it is busy there may be a window where Hazel is not detecting it being busy and some other step or process is changing the file. I would look into adding a condition to make Hazel wait a bit before moving it.
Mr_Noodle
Site Admin
 
Posts: 11273
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Problem with moving files Wed Aug 05, 2015 12:57 am • by fizbin
I am not sure if this apples to your particular problem, however I had a very similar one.

It appears that when copying files to a samba network share OS X does not lock the file, so it can be accidentally accessed by hazel while it is nt complete.

I made the following rule (and script) which appears to solve the problem.

place it as the first rule so it can ignore files in a copy state.

unfortunately I cannot explain all the xattr bits as I was unable to find the required documentation. if anyone has it please let me know :)

hope this helps someone :)

Joe


Rule:
IF
passes shell script: embedded script


DO
Ignore


the embedded script:

fb=`xattr -p com.apple.FinderInfo "$1" | awk '{print $1}' | head -n1`

if [ "$fb" == "" ]; then
fok=Y
fi

if [ "$fb" == "00" ]; then
fok=Y
fi

if [ "$fok" != "Y" ]; then
exit 0
else
exit 1
fi
fizbin
 
Posts: 1
Joined: Wed Aug 05, 2015 12:47 am

Re: Problem with moving files Wed Aug 05, 2015 11:50 am • by Mr_Noodle
Can you explain what this is checking? That xattr is not documented as it's private so I'm wondering how you came to this conclusion.
Mr_Noodle
Site Admin
 
Posts: 11273
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Previous

Return to Support