Rename Files

239
2
11-18-2019 10:51 AM
MichaelKellyTeck
Occasional Contributor

It doesn't appear like it is possible to rename Files that you have uploaded to a Notebook. This is functionality that I think would be useful. Right now you have options to select a file and delete. If there were another button for renaming a file it would make the user experience a little better. The current workaround is to download the file, rename locally and upload again which seems a little clunky.

0 Kudos
2 Replies
MichaelKellyTeck
Occasional Contributor

Also having an option to create a folder via the UI would be useful.

0 Kudos
ShannonKalisky
Occasional Contributor

Hi Michael,

You can rename files using Python:

Original File Name:

Original File Name

Rname the file using:

import os

dataset = 'Path/Name_of_original' (just clicking the plus sign next to the original file will automatically insert this snippet).

os.rename (dataset, 'Path/new_name'

Renamed File

You will need to refresh your Files TOC (navigate up to /arcgis and back to /arcgis/home) to see the changed file name.

Hope that helps!

Shannon