Help Center/ ModelArts/ FAQs/ ModelArts Standard Notebook/ How Do I Rename an OBS File on a ModelArts Notebook Instance?
Updated on 2025-08-28 GMT+08:00

How Do I Rename an OBS File on a ModelArts Notebook Instance?

OBS files cannot be renamed on the OBS console. To rename an OBS file, call a MoXing API in an existing or newly created notebook instance.

The following is an example:

Rename obs_file.txt to obs_file_2.txt.
import moxing as mox
mox.file.rename('obs://bucket_name/obs_file.txt', 'obs://bucket_name/obs_file_2.txt')