Since several hundred users have clicked on this topic, I will post the AppleScript/Objective-C solution that one can run from Apple's Script Editor, or save that script as a clickable application. The script will prompt for a folder containing the Word documents, where it just looks for an 8-digit string of numbers in the file path and reformats it as yyyy-mm-dd. There is no verification code to confirm that this is a sane date, or perhaps a numeric folder name of 8 digits.
Copy/paste the following into Apple's Script Editor, then click the compile button, and then run.
(*
Word_Rename_wo_Finder.applescript
Prompts for folder containing Word documents needing to have their yyyymmdd or
yyyyddmm integer string in the filename changed to yyyy-mm-dd or yyyy-dd-mm
format. This is a recursive script that will drill into sub-folders looking
only for Word documents. Running it more than once will not change previously
renamed Word documents.
When done, script will display a dialog with renamed document tally.
Tested: macOS 26.6.1
VikingOSX, 2026-08-09, Apple Support Communities, no warranties expressed or implied.
*)
use framework "Foundation"
use AppleScript version "2.5"
use scripting additions
property ca : current application
property docIcon : "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/MultipleItemsIcon.icns"
property allowedExts : {"doc", "docx"}
property found : 0 as integer
property renamed : 0 as integer
set nsm to ca's NSMutableString's new()
set fm to ca's NSFileManager's defaultManager()
set pred to ca's NSPredicate's predicateWithFormat_("self.pathExtension IN[c] %@", allowedExts)
-- set enumOptions to (current application's NSDirectoryEnumerationSkipsPackageDescendants as integer) + (current application's NSDirectoryEnumerationSkipsHiddenFiles as integer)
set enumOptions to 6
set theDir to POSIX path of (choose folder default location (path to desktop)) as «class furl»
set theFiles to ((fm's enumeratorAtURL:theDir includingPropertiesForKeys:{} options:enumOptions errorHandler:(missing value))'s allObjects())'s valueForKey:"path"
set wordDocs to theFiles's filteredArrayUsingPredicate:pred
set found to count of wordDocs
repeat with adoc in wordDocs
(nsm's setString:adoc)
set docRange to {0, nsm's |length|()}
-- renamed date string is in ISO8601 format (yyyy-mm-dd). if you need
-- yyyy-dd-mm just rearrange the $2 and $3 in the withString below
(nsm's replaceOccurrencesOfString:"(\\d{4})(\\d{2})(\\d{2})" withString:"$1-$2-$3" options:(ca's NSRegularExpressionSearch) range:docRange)
(fm's moveItemAtPath:adoc toPath:(nsm as text) |error|:(reference))
set renamed to renamed + 1
end repeat
display dialog "Documents Found: " & found & return & "Renamed: " & renamed with title "Word Document Renaming" with icon POSIX file docIcon as alias
return