Error creating directory

Started by Skids, January 20, 2025, 07:40:35 AM

Previous topic - Next topic

Skids

Hi,
I attempting to write a command that copies image files from an SD Card to an attached SSD.  I am running a Mac M2 on OS Sonoma.  The command works o.k. in its -Testname version but in the working version the command fails with a Warning : error creating directory message.  I have checked the permissions on the destination volume and confirmed that everyone has read/write privilege.

Here are the two versions of the command:

% exiftool  -r '-TestName<CreateDate' -d '/Volumes/Images_Disc02_Master/TempTestImageUpdated/%Y-%m/%Y_%m_%d_%H%M%S_%%f.%%e' /Volumes/RICOH\ GR/TempTestImage
'/Volumes/RICOH GR/TempTestImage/_G003744.DNG' --> '/Volumes/Images_Disc02_Master/TempTestImageUpdated/2024-11/2024_11_16_205541__G003744.DNG'
'/Volumes/RICOH GR/TempTestImage/_G003745.DNG' --> '/Volumes/Images_Disc02_Master/TempTestImageUpdated/2024-11/2024_11_16_205544__G003745.DNG'
    1 directories scanned
    0 image files updated
    2 image files unchanged


and
exiftool  -r '-FileName<CreateDate' -d '/Volumes/Images_Disc02_Master/TempTestImageUpdated/%Y-%m/%Y_%m_%d_%H%M%S_%%f.%%e' /Volumes/RICOH\ GR/TempTestImage 
Error creating directory /Volumes/Images_Disc02_Master
Warning: Error creating directory for '/Volumes/Images_Disc02_Master/TempTestImageUpdated/2024-11/2024_11_16_205541__G003744.DNG' - /Volumes/RICOH GR/TempTestImage/_G003744.DNG
Error creating directory /Volumes/Images_Disc02_Master
Warning: Error creating directory for '/Volumes/Images_Disc02_Master/TempTestImageUpdated/2024-11/2024_11_16_205544__G003745.DNG' - /Volumes/RICOH GR/TempTestImage/_G003745.DNG
    1 directories scanned
    0 image files updated
    2 files weren't updated due to errors


The path names were all both copied from the Terminal following a drad/drop of the subject folder.  Any ideas where my mistake is ?

Thanks
S

Phil Harvey

QuoteError creating directory /Volumes/Images_Disc02_Master

It seems that the Images_Disc02_Master volume is not mounted, and of course ExifTool can't create a new disk volume.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Skids

Hi Phil,

Unfortunately that is not the issue as the volume is mounted.  If is not an issue of syntax then is one of permissions / sandbox ?

S

wywh

Does Terminal have Full Disk Access enabled in System Settings > Privacy & Security? In my setup Terminal has always prompted to give a permission to do so, if needed.

Phil Harvey

Are you sure you have the case correct for the volume name?  I'm on a mac myself and use ExifTool all the time for mounted SD and SSD volumes.

I suggest trying to access/create the directories from the command line using the "mkdir" command to see how that goes.  ie)

1. ls /Volumes/Images_Disc02_Master

2. mkdir /Volumes/Images_Disc02_Master (if necessary)

3. ls /Volumes/Images_Disc02_Master/TempTestImageUpdated

4. mkdir /Volumes/Images_Disc02_Master/TempTestImageUpdated (if necessary)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Skids

I have managed to get the command to work - phew and thanks for all your help.

I restarted Terminal and reentered the path to the destination and the command works.  What is odd is that both paths look the same so I wonder if there was some issue with UTF or similar.

Obviously I only tried the above after I checked that Full Disk Access was granted and that mkdir worked.

best wishes

S


 

Phil Harvey

Command-line tab completion is your friend.  It avoids typos and encoding errors that can cause problems like this.

I would have typed your command like this:

exiftool -r '-TestName<CreateDate' -d '/V<tab>Im<tab>TempT<tab>%Y-%m/%Y_%m_%d_%H%M%S_%%f.%%e' /V<tab>RI<tab>TempT<tab>

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Skids

Quote"Command-line tab completion is your friend."

I did not know that the terminal had this feature, thanks for bringing it to my attention.

S