Is there a way for G'MIC to check modified date of a folder?

I found palettes with duplicates colors in +pal, so I would like for G’MIC to autocheck if a folder is old, so I can update it.

  echo {"date([0,1,2],'Folder')"}

To get the year,month,day of the folder creation.

1 Like

Great.

After checking G’MIC command list, no rmdir?

EDIT: Just outputting should overwrite the affected palette.

That’s called delete.

~$ gmic h delete

  delete (+):
      filename1[,filename2,...]

    Delete specified filenames on disk. Multiple filenames must be separated by commas.

Got it. I did looked at that, but the filename1,filename too thing made me assume that it didn’t do anything about folders.

I checked now:

C:\Users\User\AppData\Roaming\gmic>gmic e {"date([0,1,2],'sample_cat.png')"}
[gmic]./ Start G'MIC interpreter (v.3.7.2).
2024,9,5
[gmic]./ End G'MIC interpreter.
C:\Users\User\AppData\Roaming\gmic>gmic e {"date([0,1,2],'gmic_community_pals')"}
[gmic]./ Start G'MIC interpreter (v.3.7.2).
-1,-1,-1
[gmic]./ End G'MIC interpreter.
D:\Pictures\Spirographs>gmic e {date([0,1,2],'Spirogr1.png')}
[gmic]./ Start G'MIC interpreter (v.3.7.2).
2015,6,30
[gmic]./ End G'MIC interpreter.

It doesn’t work on folders on Windows. On the bright side, learned how date() works.

I figured it out, I use one of the affected file instead of folder. So, the code I pushed should just update two palettes. And there is a nag reminder to remove code block which only shows up later.