フィルターのクリア

how to restore deleted frame

2 ビュー (過去 30 日間)
Elysi Cochin
Elysi Cochin 2012 年 12 月 22 日
i have a folder of images... i wrote a code to delete an image from it and restore the deleted image....i display the folder of images in a listbox and on select of a particular item from listbox i delete that image from the folder and listbox.... but if i delete more than one image only the last image i deleted is getting restored... can anyone help me with the code....

採用された回答

Image Analyst
Image Analyst 2012 年 12 月 22 日
I think you're best off just reloading the listbox from the directory listing instead of trying to micromanage the old listbox string. Regardless, I don't see where you're restoring any items to the listbox. You delete an item(s) but never stick any back it, at least not in the code you showed.
  8 件のコメント
Walter Roberson
Walter Roberson 2012 年 12 月 26 日
That's fine, but you need to decide how you want to store the content of the "deleted" images. I am assuming, of course, that the images contain indecency so you cannot use the usual trick of uploading them as a youtube video.
Image Analyst
Image Analyst 2012 年 12 月 26 日
編集済み: Image Analyst 2012 年 12 月 26 日
I don't know what restore means either. Have you seen this in the help:
By default, the delete function permanently deletes files. To move them to a different location instead, use the Deleting files preference:
1.
On the Home tab, in the Environment section, click Preferences > General.
2.
Set the Deleting files option you want.
Setting the preference to delete files permanently makes delete run faster.
To override the preference when using the delete function, use the recycle function.
So if you want to restore a function, you'll most likely need the movefile() function to restore it out of the recycle bin, but you'll first need to use the recycle() function rather than the delete() function.

サインインしてコメントする。

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 12 月 22 日

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by