mkdir + subdirs based on new dir in watched stopped working

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

Moderator: Mr_Noodle

the rules/embedded script worked previously

here is a link to video proof https://vimeo.com/368412750 that the rules worked in a previous version of hazel.

the rules are

Code: Select all
KIND   IS    FOLDER
DATE last Matched IS Blank
DATE created IS in the last 5 Mins
NAME MATCHES <date>tag


the embedded script to run when triggered is

Code: Select all
/bin/zsh
mkdir -p $1/{Music,Fotos/{B\ Roll,80D,Timelapse},Video/{hyperlapse,zoom}}


which would create folders in desired locations

Code: Select all
~/wacthedDir/NewDir($1)/Music
                 |-----/Fotos/B Roll
                 |         |_/80D
                 |         |_/Timelapse
                 |------/Video/Hyperlapse
                           |_/zoom

However, NOW I get a notification error that hazel "shell script failed error processing shell script on file 'newDirName'"

I have changed the 'shell' path in 'ebedded path' from bash, zsh, sh, and fish. most fail, bash and sh will create all the Directories in the watched Directory.


any suggestions would be appreciated
elgallo
 
Posts: 17
Joined: Sat Apr 19, 2014 7:41 am

Turn on debug mode as described here: https://www.noodlesoft.com/kb/hazel-debug-mode/

After that, check the logs. Any output from the script should appear there.
Mr_Noodle
Site Admin
 
Posts: 8318
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

this is the output from log with the shell env set to zsh
Code: Select all
== End script output ==
2019-10-26 07:44:51.115 hazelworker[837] [Error] Shell script failed: Error processing shell script on file /Users/gallo/Downloads/22 June 2019.
2019-10-26 07:44:51.115 hazelworker[837] Shellscript exited with non-successful status code: 1
2019-10-26 07:44:51.115 hazelworker[837] DEBUG: Tapping error retry sequence
2019-10-26 07:44:51.115 hazelworker[837] DEBUG: Writing out DB file for /Users/gallo/Downloads to path: /Users/gallo/Library/Application Support/Hazel/16777223-741374.hazeldb
2019-10-26 07:44:51.116 hazelworker[837] DEBUG: Directory /Users/gallo/Downloads processed in 0.016792 seconds
2019-10-26 07:44:51.117 HazelHelper[375] DEBUG: Checking events for path /Users/gallo/Downloads, folder Downloads
2019-10-26 07:44:51.117 hazelworker[837] DEBUG: Sleeping
2019-10-26 07:44:59.127 hazelworker[837] DEBUG: About to process directory /Users/gallo/Downloads
2019-10-26 07:44:59.136 hazelworker[837] DEBUG: .DS_Store: File is hidden/invisible. Skipping.
2019-10-26 07:44:59.137 hazelworker[837] DEBUG: .localized: File is hidden/invisible. Skipping.
2019-10-26 07:44:59.139 hazelworker[837] 22 June 2019: Rule folder expansion creation matched.
2019-10-26 07:44:59.139 hazelworker[837] DEBUG: Got error last time. Re-trying actions.
2019-10-26 07:44:59.150 hazelworker[837] DEBUG: == script output ==
/var/folders/4q/1blj4x9904xgstq9yf7pj93c0000gn/T/hazelworker-837/hazelscript.sh:1: parse error near `}'


this is the out put when env is sh

Code: Select all
2019-10-26 07:56:37.788 HazelHelper[375] DEBUG: Thread 0x60000026ec40: Received events (
        {
        date = "2019-10-26 14:56:37 +0000";
        path = "/Users/gallo/Downloads/12 Jan 2019";
        shouldDoFullScan = 0;
    }
) for stream at path: /Users/gallo/Downloads
2019-10-26 07:56:37.798 HazelHelper[375] DEBUG: Thread 0x60000026ec40: Run worker for folder: /Users/gallo/Downloads
2019-10-26 07:56:37.827 hazelworker[945] Running worker (v4.3.5) for folder with identifier: 16777223-741374.
2019-10-26 07:56:37.828 hazelworker[945] ###main load address: 0x10ac99000
2019-10-26 07:56:37.828 hazelworker[945] ###Noodle load address: 0x10adbe000
2019-10-26 07:56:37.828 hazelworker[945] ###CK load address: 0x10ad80000
2019-10-26 07:56:37.836 hazelworker[945] DEBUG: Program is licensed.
2019-10-26 07:56:37.858 hazelworker[945] DEBUG: Could not find entry for default_directory in Chrome preference file.
2019-10-26 07:56:37.862 hazelworker[945] Processing folder Downloads
2019-10-26 07:56:37.862 hazelworker[945] DEBUG: Pausing to wait for things to settle down.
2019-10-26 07:56:39.863 hazelworker[945] DEBUG: Processing directories: (
    "/Users/gallo/Downloads"
)
2019-10-26 07:56:39.868 HazelHelper[375] DEBUG: Checking events for path /Users/gallo/Downloads, folder Downloads
2019-10-26 07:56:39.870 hazelworker[945] DEBUG: Received file event: {
    date = "2019-10-26 14:56:37 +0000";
    path = "<ComNoodlesoft_NoodlePathSet: 0x7f85d6d02560>\n  /Users/gallo/Downloads/12 Jan 2019 : 0\n";
}
2019-10-26 07:56:39.870 hazelworker[945] DEBUG: About to process directory /Users/gallo/Downloads
2019-10-26 07:56:39.873 hazelworker[945] DEBUG: .DS_Store: File is hidden/invisible. Skipping.
2019-10-26 07:56:39.873 hazelworker[945] DEBUG: .localized: File is hidden/invisible. Skipping.
2019-10-26 07:56:39.910 hazelworker[945] 12 Jan 2019: Rule folder expansion creation matched.
2019-10-26 07:56:39.910 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder" AND dateMatched hazelIsEmpty: <null> AND dateCreated hazelIsInTheLast: 1 Minute AND displayBasename hazelMatchesPattern: ({hazelcustomtoken:date:cap:auto}),{
}}:{(shellscript:/bin/bash:079a1f2a314e15abaf52c09bd12e65ef,{
})}
2019-10-26 07:56:39.921 HazelHelper[375] DEBUG: Thread 0x60000026ec40: Received events (
        {
        date = "2019-10-26 14:56:39 +0000";
        path = "/Users/gallo/Downloads/12";
        shouldDoFullScan = 0;
    },
        {
        date = "2019-10-26 14:56:39 +0000";
        path = "/Users/gallo/Downloads/Jan";
        shouldDoFullScan = 0;
    },
        {
        date = "2019-10-26 14:56:39 +0000";
        path = "/Users/gallo/Downloads/2019";
        shouldDoFullScan = 0;
    },
        {
        date = "2019-10-26 14:56:39 +0000";
        path = "/Users/gallo/Downloads/2019/{Music,Fotos";
        shouldDoFullScan = 0;
    },
        {
        date = "2019-10-26 14:56:39 +0000";
        path = "/Users/gallo/Downloads/2019/{Music,Fotos/{m50 mk ii,";
        shouldDoFullScan = 0;
    },
        {
        date = "2019-10-26 14:56:39 +0000";
        path = "/Users/gallo/Downloads/7D mk3},Video";
        shouldDoFullScan = 0;
    },
        {
        date = "2019-10-26 14:56:39 +0000";
        path = "/Users/gallo/Downloads/7D mk3},Video/{b roll,cam a,";
        shouldDoFullScan = 0;
    },
        {
        date = "2019-10-26 14:56:39 +0000";
        path = "/Users/gallo/Downloads/hyperlapse}}";
        shouldDoFullScan = 0;
    }
) for stream at path: /Users/gallo/Downloads
2019-10-26 07:56:39.922 hazelworker[945] DEBUG: == script output ==

== End script output ==
2019-10-26 07:56:39.922 HazelHelper[375] DEBUG: Thread 0x60000026ec40: Run worker for folder: /Users/gallo/Downloads
2019-10-26 07:56:39.922 HazelHelper[375] DEBUG: Task already running for folder: /Users/gallo/Downloads
2019-10-26 07:56:39.922 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/12 Jan 2019: 2019-10-26 14:56:39 +0000
2019-10-26 07:56:39.922 hazelworker[945] DEBUG: Rule requires extra matching pass.
2019-10-26 07:56:39.924 hazelworker[945] DEBUG: Action changed file: 12 Jan 2019
2019-10-26 07:56:39.939 hazelworker[945] DEBUG: Writing out DB file for /Users/gallo/Downloads to path: /Users/gallo/Library/Application Support/Hazel/16777223-741374.hazeldb
2019-10-26 07:56:39.940 hazelworker[945] DEBUG: Directory /Users/gallo/Downloads processed in 0.069789 seconds
2019-10-26 07:56:39.941 HazelHelper[375] DEBUG: Checking events for path /Users/gallo/Downloads, folder Downloads
2019-10-26 07:56:39.942 hazelworker[945] DEBUG: Received file event: {
    date = "2019-10-26 14:56:39 +0000";
    path = "<ComNoodlesoft_NoodlePathSet: 0x7f85d6d41e30>\n  /Users/gallo/Downloads/2019 : 0\n  /Users/gallo/Downloads/2019/{Music,Fotos : 0\n  /Users/gallo/Downloads/2019/{Music,Fotos/{m50 mk ii, : 0\n  /Users/gallo/Downloads/12 : 0\n  /Users/gallo/Downloads/hyperlapse}} : 0\n  /Users/gallo/Downloads/7D mk3},Video : 0\n  /Users/gallo/Downloads/7D mk3},Video/{b roll,cam a, : 0\n  /Users/gallo/Downloads/Jan : 0\n";
}
2019-10-26 07:56:39.942 hazelworker[945] DEBUG: Sleeping
2019-10-26 07:56:41.951 hazelworker[945] DEBUG: About to process directory /Users/gallo/Downloads
2019-10-26 07:56:41.953 hazelworker[945] DEBUG: .DS_Store: File is hidden/invisible. Skipping.
2019-10-26 07:56:41.953 hazelworker[945] DEBUG: .localized: File is hidden/invisible. Skipping.
2019-10-26 07:56:41.959 hazelworker[945] Jan: Rule subdir matched.
2019-10-26 07:56:41.959 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:41.959 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/Jan: 2019-10-26 14:56:41 +0000
2019-10-26 07:56:41.961 hazelworker[945] DEBUG: Jan: Did not match any rules.
2019-10-26 07:56:41.961 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/Jan
2019-10-26 07:56:41.964 hazelworker[945] 2019: Rule subdir matched.
2019-10-26 07:56:41.964 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:41.964 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/2019: 2019-10-26 14:56:41 +0000
2019-10-26 07:56:41.965 hazelworker[945] DEBUG: 2019: Did not match any rules.
2019-10-26 07:56:41.965 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/2019
2019-10-26 07:56:41.968 hazelworker[945] {Music,Fotos: Rule subdir matched.
2019-10-26 07:56:41.968 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:41.968 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/2019/{Music,Fotos: 2019-10-26 14:56:41 +0000
2019-10-26 07:56:41.969 hazelworker[945] DEBUG: {Music,Fotos: Did not match any rules.
2019-10-26 07:56:41.969 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/2019/{Music,Fotos
2019-10-26 07:56:41.972 hazelworker[945] {m50 mk ii,: Rule subdir matched.
2019-10-26 07:56:41.972 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:41.972 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/2019/{Music,Fotos/{m50 mk ii,: 2019-10-26 14:56:41 +0000
2019-10-26 07:56:41.973 hazelworker[945] DEBUG: {m50 mk ii,: Did not match any rules.
2019-10-26 07:56:41.973 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/2019/{Music,Fotos/{m50 mk ii,
2019-10-26 07:56:41.976 hazelworker[945] hyperlapse}}: Rule subdir matched.
2019-10-26 07:56:41.976 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:41.976 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/hyperlapse}}: 2019-10-26 14:56:41 +0000
2019-10-26 07:56:41.977 hazelworker[945] DEBUG: hyperlapse}}: Did not match any rules.
2019-10-26 07:56:41.977 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/hyperlapse}}
2019-10-26 07:56:41.979 hazelworker[945] 7D mk3},Video: Rule subdir matched.
2019-10-26 07:56:41.979 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:41.979 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/7D mk3},Video: 2019-10-26 14:56:41 +0000
2019-10-26 07:56:41.980 hazelworker[945] DEBUG: 7D mk3},Video: Did not match any rules.
2019-10-26 07:56:41.980 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/7D mk3},Video
2019-10-26 07:56:41.983 hazelworker[945] {b roll,cam a,: Rule subdir matched.
2019-10-26 07:56:41.983 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:41.983 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/7D mk3},Video/{b roll,cam a,: 2019-10-26 14:56:41 +0000
2019-10-26 07:56:41.984 hazelworker[945] DEBUG: {b roll,cam a,: Did not match any rules.
2019-10-26 07:56:41.984 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/7D mk3},Video/{b roll,cam a,
2019-10-26 07:56:41.984 hazelworker[945] DEBUG: Skipped /Users/gallo/Downloads/12 Jan 2019. File/folder not part of change set/file event.
2019-10-26 07:56:41.986 hazelworker[945] 12: Rule subdir matched.
2019-10-26 07:56:41.986 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:41.986 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/12: 2019-10-26 14:56:41 +0000
2019-10-26 07:56:41.987 hazelworker[945] DEBUG: 12: Did not match any rules.
2019-10-26 07:56:41.987 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/12
2019-10-26 07:56:41.987 hazelworker[945] DEBUG: Writing out DB file for /Users/gallo/Downloads to path: /Users/gallo/Library/Application Support/Hazel/16777223-741374.hazeldb
2019-10-26 07:56:41.988 hazelworker[945] DEBUG: Directory /Users/gallo/Downloads processed in 0.036774 seconds
2019-10-26 07:56:41.989 HazelHelper[375] DEBUG: Checking events for path /Users/gallo/Downloads, folder Downloads
2019-10-26 07:56:41.989 hazelworker[945] DEBUG: Sleeping
2019-10-26 07:56:44.001 hazelworker[945] DEBUG: About to process directory /Users/gallo/Downloads
2019-10-26 07:56:44.002 hazelworker[945] DEBUG: .DS_Store: File is hidden/invisible. Skipping.
2019-10-26 07:56:44.002 hazelworker[945] DEBUG: .localized: File is hidden/invisible. Skipping.
2019-10-26 07:56:44.006 hazelworker[945] Jan: Rule subdir matched.
2019-10-26 07:56:44.006 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:44.006 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/Jan: 2019-10-26 14:56:44 +0000
2019-10-26 07:56:44.007 hazelworker[945] DEBUG: Jan: Did not match any rules.
2019-10-26 07:56:44.007 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/Jan
2019-10-26 07:56:44.010 hazelworker[945] 2019: Rule subdir matched.
2019-10-26 07:56:44.010 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:44.010 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/2019: 2019-10-26 14:56:44 +0000
2019-10-26 07:56:44.011 hazelworker[945] DEBUG: 2019: Did not match any rules.
2019-10-26 07:56:44.011 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/2019
2019-10-26 07:56:44.013 hazelworker[945] {Music,Fotos: Rule subdir matched.
2019-10-26 07:56:44.013 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:44.013 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/2019/{Music,Fotos: 2019-10-26 14:56:44 +0000
2019-10-26 07:56:44.014 hazelworker[945] DEBUG: {Music,Fotos: Did not match any rules.
2019-10-26 07:56:44.014 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/2019/{Music,Fotos
2019-10-26 07:56:44.017 hazelworker[945] {m50 mk ii,: Rule subdir matched.
2019-10-26 07:56:44.017 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:44.017 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/2019/{Music,Fotos/{m50 mk ii,: 2019-10-26 14:56:44 +0000
2019-10-26 07:56:44.018 hazelworker[945] DEBUG: {m50 mk ii,: Did not match any rules.
2019-10-26 07:56:44.018 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/2019/{Music,Fotos/{m50 mk ii,
2019-10-26 07:56:44.020 hazelworker[945] hyperlapse}}: Rule subdir matched.
2019-10-26 07:56:44.021 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:44.021 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/hyperlapse}}: 2019-10-26 14:56:44 +0000
2019-10-26 07:56:44.021 hazelworker[945] DEBUG: hyperlapse}}: Did not match any rules.
2019-10-26 07:56:44.021 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/hyperlapse}}
2019-10-26 07:56:44.024 hazelworker[945] 7D mk3},Video: Rule subdir matched.
2019-10-26 07:56:44.024 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:44.024 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/7D mk3},Video: 2019-10-26 14:56:44 +0000
2019-10-26 07:56:44.025 hazelworker[945] DEBUG: 7D mk3},Video: Did not match any rules.
2019-10-26 07:56:44.025 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/7D mk3},Video
2019-10-26 07:56:44.027 hazelworker[945] {b roll,cam a,: Rule subdir matched.
2019-10-26 07:56:44.027 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:44.027 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/7D mk3},Video/{b roll,cam a,: 2019-10-26 14:56:44 +0000
2019-10-26 07:56:44.028 hazelworker[945] DEBUG: {b roll,cam a,: Did not match any rules.
2019-10-26 07:56:44.028 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/7D mk3},Video/{b roll,cam a,
2019-10-26 07:56:44.031 hazelworker[945] 12 Jan 2019: Rule subdir matched.
2019-10-26 07:56:44.031 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:44.031 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/12 Jan 2019: 2019-10-26 14:56:44 +0000
2019-10-26 07:56:44.031 hazelworker[945] DEBUG: 12 Jan 2019: Did not match any rules.
2019-10-26 07:56:44.031 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/12 Jan 2019
2019-10-26 07:56:44.034 hazelworker[945] 12: Rule subdir matched.
2019-10-26 07:56:44.034 hazelworker[945] DEBUG: New rule signature. Executing actions.
Old signatures: (
)
New Signature:{typeObject isType: "public.folder"}:{(continue:,{
})(recurse:,{
})}
2019-10-26 07:56:44.034 hazelworker[945] DEBUG: Rule executed. Updating match date for file /Users/gallo/Downloads/12: 2019-10-26 14:56:44 +0000
2019-10-26 07:56:44.034 hazelworker[945] DEBUG: 12: Did not match any rules.
2019-10-26 07:56:44.034 hazelworker[945] DEBUG: Recursing into directory: /Users/gallo/Downloads/12
2019-10-26 07:56:44.035 hazelworker[945] DEBUG: Writing out DB file for /Users/gallo/Downloads to path: /Users/gallo/Library/Application Support/Hazel/16777223-741374.hazeldb
2019-10-26 07:56:44.036 hazelworker[945] DEBUG: Directory /Users/gallo/Downloads processed in 0.034666 seconds
2019-10-26 07:56:44.036 HazelHelper[375] DEBUG: Checking events for path /Users/gallo/Downloads, folder Downloads
2019-10-26 07:56:44.036 hazelworker[945] DEBUG: Sending metrics to scheduler. Next scheduled run: 4000-12-31 16:00:00.000
2019-10-26 07:56:44.037 HazelHelper[375] DEBUG: Received metrics for folder /Users/gallo/Downloads: {
    directoryDepth = 18446744073709551615;
    requestedSchedulingTime = "4001-01-01 00:00:00 +0000";
    triggerPaths = "<ComNoodlesoft_NoodlePathSet: 0x600001744880>\n";
    unavailablePaths = "{(\n)}";
}
2019-10-26 07:56:44.037 HazelHelper[375] DEBUG: Timer scheduled for folder /Users/gallo/Downloads at 4001-01-01 00:00:00 +0000
2019-10-26 07:56:44.038 hazelworker[945] Done processing folder Downloads
2019-10-26 07:56:44.041 HazelHelper[375] DEBUG: Thread 0x60000026ec40: Task removed: [945]


in 'zsh' Hazel appears to trigger and fail (no dirs created)
in 'bash' Hazel makes dirs, but places them incorrectly.

Code: Select all
~/Downloads/7D mk3},Video/{b roll,cam a,/
        |__/12
        |__/12 Jan 2019
        |__/2019/{Music,Fotos
        |__/Hyperlapse}}
        |__/Jan
elgallo
 
Posts: 17
Joined: Sat Apr 19, 2014 7:41 am

Have you tried the script outside of Hazel? Also, you should not switch to zsh without rewriting the script (if you originally wrote it with sh/bash in mind).

Also, it doesn't look like you are accounting for spaces in the path. I would suggest quoting it.
Mr_Noodle
Site Admin
 
Posts: 8318
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

The script works outside of hazel, when of course, I replace $1 {properly\ escaped\ dir\ name}

The script also worked in a previous version of Hazel as seen in the vimeo link. I do not recall changing/setting zsh in the original script Hazel {embedded script}. I changed/tested the shell to see what errors I would get.

{/bin/zsh} was meant to specify which shell I was using.

quoting the path "$1/{Music,Fotos/{B\ Roll,80D,Timelapse},Video/{hyperlapse,zoom}}"


now makes

Image
elgallo
 
Posts: 17
Joined: Sat Apr 19, 2014 7:41 am

figured out a solution

Code: Select all
mkdir -p $1/{"Music","Fotos"}/{"B Roll","80D","Timelapse"}
mkdir -p $1/Video/{"hyperlapse","zoom"}


I tried a few variations (stubbornly wanted to make it a one liner). In the end I think this is more clear as to how/what I was trying to nest.
Hopefully this helps someone else that is trying to do something similar
elgallo
 
Posts: 17
Joined: Sat Apr 19, 2014 7:41 am

You might want to quote the $1 individually, e.g. "$1".
Mr_Noodle
Site Admin
 
Posts: 8318
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support