How to change change sprites from command line

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By NikhilKadiyan

I know that there is this docs page Command line tutorial — Godot Engine (latest) documentation in English
But it doesn’t tell how to change sprites.
Say there is a sprite frog.png . I want to overwrite it with another file named frog.png having a different image. I could just do it from OS commands, but I believe Godot should re import the image too.
How can I do it, especially the re import part.

:bust_in_silhouette: Reply From: Calinou

To make Godot reimport all assets from the command line, start the project with the following arguments:

# Specifying the path to the `project.godot` file will open the editor directly.
/path/to/godot.binary /path/to/project/project.godot --quit

--quit will exit Godot after one iteration, just after it’s done reimporting assets.