Move rename file directory
  • 18 May 2022
  • 1 Minute to read
  • Dark
  • PDF

Move rename file directory

  • Dark
  • PDF

Article Summary

Moves the target file to a new location in the filesystem. Can also be used to rename a file by moving it within the same folder.

Input arguments

Source file pathsourcePathString(local-filesystem-reference)YesAbsolute local filesystem path to the source file/directory, including possible filename and extension.
Target file pathtargetPathString(local-filesystem-reference)YesAbsolute local filesystem path to the target file/directory, including possible filename and extension.
Relative target path?relativeTargetPathBooleanYesIf true, Target file path is interpreted as relative to the source path parent folder.
Overwrite target file?overwriteBooleanYestrueIf true, overwrite the target file.

Output arguments

Number of outputs: 2

FilefileObjectObject representing the moved file at its new location. Empty if a directory was moved.
  • Local path
file.pathStringAbsolute local filesystem path representing the file location on the device, including the filename and extension. On web, this is created via the [`createObjectURL`]( method.
  • MIME type
file.mimeTypeStringMIME type of the file, if it could be determined.
  • Name
file.nameStringName of the file in the local filesystem, if applicable. Note that the filename and extension are included in the **Local path** property already.
  • Size
file.sizeNumberSize of the file, in bytes.
  • Created at
file.createdAtStringCreation datetime of the file, if it can be determined.
  • Modified at
file.modifiedAtStringDatetime when the file was last modified, if it can be determined.


No events.


Unkown errorunknownThrown if an unknown error occured while moving the file.

Was this article helpful?

What's Next