Skip to main content

Rename folder

Give a folder a new name in the same parent folder, optionally only when its total size or its last-change date meets limits.

Command in the Folder toolkit · id ooa.folder/rename_folder · 6 inputs (2 required), 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
PathFileYesFolder to rename.
New nameStringYesNew name only, without any path.
Larger than (KB)NumberNoOnly when the folder holds more than this many KB in all its files, at any depth (1 KB = 1024 bytes).
Smaller than (KB)NumberNoOnly when the folder holds less than this many KB in all its files, at any depth.
Modified afterDateTimeNoOnly when the folder itself was last changed after this date and time (local time); adding or removing an item directly inside changes it.
Modified beforeDateTimeNoOnly when the folder itself was last changed before this date and time (UTC, like every DateTime; Text to date converts local times).

Outputs​

OutputTypeWhat it is
pathFileNew full path of the folder; the unchanged path when it did not meet the limits.
renamedBooleanTrue when the folder was renamed; false when it did not meet the limits.