change_file_extension

Change the file extension of a file.

Arguments

NameTypeDescriptionRequired

path_to_file

string

Path to the file whose extension is to be changed.

new_extension

string

New file extension to be applied. Examples include 'ts', 'scss', 'py', without a preceding dot.

Returns

TypeDescription

string

The new file name with the updated extension.

Example

- name: change_file_extension
  arguments:
    path_to_file: <path-to-file>
    new_extension: <new-extension>
  returns: <new-file-name>

Last updated