Rename Every File Inside a Folder with a Name Having 10 Digits

please

i need a macro that take all the files in folder call "HIDE PHOTOS DETA i" (/Users/Shared/Previously Relocated Items/Security)
and rename every file inside this folder
with name that have 10 digit
from 0 until 9
the macro will pick the name in randomly
like :slight_smile
the first digit in the name can be 0,1,2,3,4,5,6,7,8,9
the secound digit in the name can be 0,1,2,3,4,5,6,7,8,9
and so on .........

Here's a possible untested solution.
It will use all numbers for the file name, sequentially numbering them starting with "0000000001".

  1. Set a Counter Variable "Local__Count" to 0.

  2. Use For Each action with a Folder Contents collection.
    Name the For Each loop variable "Local__FilePath"
    with these Actions in it:

    1. Use the Get File Attribute action to get the file extension into Variable "Local__FileExt"
    2. Increment counter Variable Local__Count by 1, and use the format option to pad with zeros:
      • image
        (enter 10 zeros into the format field)
    3. Rename using Move or Rename Action
      • image
        %Local__Count%.%Local__FileExt%

That should do it.
Of course, you should carefully test in a TEST folder with only a few files to make sure it does what you want.

2 posts were merged into an existing topic: Add counter to files based on creation date from Finder

Or this single action will do it all:

image

This macro is potentially dangerous so I'm only including it as a photographic image. Don't try to run it unless you can read the man pages for each command and understand what each command does. I'm happy to explain any specific questions someone might have.