deanflyer
Enthusiast
Enthusiast

Datastore - How to delete/rename a folder???

Hi,

Probably being stupid but using the datastore browser, I can upload files/folders, I can delete files but I cant delete folders (or rename them).

Any advice on how to do this.

Thanks,

Dean

14 Replies
Yattong
Expert
Expert

Hey Dean,

Using the datastore browser, you cannot modify folders e.g. delete folders, that are not empty.

You need to delete the files within first before you can delete the folder.

If you need to rename a folder, then create a new folder and move the files from the source folder to your new folder.



If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

~y

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points ~y
0 Kudos
mdippa
Contributor
Contributor

I am having the same problem as Dean. I have deleted all the files out of the folders that I no longer need, but I still cannot deleted the actual folders themselves. Is there a way to delete these folders?

0 Kudos
deanflyer
Enthusiast
Enthusiast

Yes - I still have this problem. I can deleted files no problem, but cannot delete folders.

Does anybody have a resolution for this, or has come across this before.

0 Kudos
SuryaVMware
Expert
Expert

ssh in to the ESX server and delete with the rm -r command for your empty directories and mv command to rename the file.

-Surya

flashsd
Contributor
Contributor

Sorry for the late reply. When in the DataStore Browser. Click on the Search Tab. Then search for the folder you would like to delete. Select the Folder, Then click the Delete button.

Hope this helps.

Craig_Baltzer
Expert
Expert

The "delete" is only available when you have something selected in the right pane of the datastore browser. If you want to delete a folder, click level above it in the left pane (i.e. click on the "/" folder) so that the folder you want to delete is displayed in the right pane. Then click the folder to be deleted in the right pane and click the red "X" icon in the toolbar (or do a right-click then pick Delete from disk). The folder does not have to be empty.

Same deal holds for rename (i.e. you can only "rename" things in the right pane, so you have to go one level "up" in the left pane so the thing you want to rename is displayed in the right pane).

dtalk
Contributor
Contributor

Speaking of which, this is a real peeve: a "rename" using the datastore browser appears to actually be a "copy and delete" operation, and takes a horribly long time. To deploy a VM from a template on a standalone host without the template features of the Virtual Center therefore requires two long copy operations: copy the image, then "rename" the image.

To make matters much worse, there is no progress indication of any sort while this is occuring. Until the operation completes, the old folder and the new will remain visible, and attempting to manipulate either of them can result in corruption.

I haven't spent enough time with the rcli yet to see if it offers a more elegant analog to this operation.

0 Kudos
priceian64
Contributor
Contributor

I've just started out using ESXi and have also found this issue (long time to rename) or indeed copying within the datastore. I also found that the copy did a move rather than a copy? I've just renamed a VM again and it is now at 10% progress and will probably take a few hours to complete!

0 Kudos
ubignor
Contributor
Contributor

really simple

in datastore browser in left pane find " \ " (root directory) and select. now just right click on your considered folder which there is in right pane, so you can rename and do some other action. 

NOTE: if you want rename one of your folder that you have active VM there, you should first remove your VM from inventory and after renaming find the ".vmx"  file and add it to inventory again.

thanks

fadishaya
Contributor
Contributor

I was having this same issue, then I have checked the VM and I found that some of the data that was not able to be deleted from the datastore was attached to one or two machines. means the files you were trying to use were in used.

Regards

!

0 Kudos
PhilBedell
Contributor
Contributor

This worked as described for me.  Strange that you need to search it to make that option available, but it works.

0 Kudos
T9D65
Contributor
Contributor

thanks for your reply.

it really helped a lot :smileycheck:

0 Kudos
aa2017
Contributor
Contributor

Basically, I had the same issue. But, then I clicked on the datastore on the left. I saw all the folders below the datastore and the folder to the right. Now, the delete option is available. So, you make sure that you click the folder to delete and vola, it is gone. **bleep**, I could clean a lot of unwanted folders.

0 Kudos
suriya_sora
Contributor
Contributor

To delete a folder in the data store, you need root privileges only.

0 Kudos