フィルターのクリア

To lock\hide a folder using matlab

21 ビュー (過去 30 日間)
punith
punith 2012 年 3 月 9 日
回答済み: Vicente 2015 年 3 月 13 日
hi, can any one tell me how i can lock or hide a folder using matlab....like if give a path as input..the code should hide or lock....and then unhide or unlock upon my demand....
thanks in advance

採用された回答

Jan
Jan 2012 年 3 月 9 日
See fileattrib. E.g.:
On Windows platforms, make the folder d:/work/results and all its contents read only and hidden.
fileattrib('D:/work/results','+h -w','','s')
  1 件のコメント
punith
punith 2012 年 3 月 12 日
thanx

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

その他の回答 (2 件)

Jason Ross
Jason Ross 2012 年 3 月 9 日
Keep in mind that file locking is generally not a great way to prohibit access, as there are ways of circumventing the locks, and you also have to deal with any number of circumstances where you need to unlock a file that shouldn't be locked, or find the hidden folder when your program crashes in the middle.
Essentially what you end up doing is re-writing a database at some point. I'd really suggest looking into how you can get and send data from a database, as they handle a lot of the problems that people would like to use file locking for, only much more gracefully. There are many open source databases that have proven production records to be able to handle large transaction volumes.
  1 件のコメント
punith
punith 2012 年 3 月 12 日
thanx for the comment

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


Vicente
Vicente 2015 年 3 月 13 日
I was working on a file (2012a version), in what appeared to be a hidden folder, when suddenly I had to change computer, and I couldn't locate the folder in my hard disk anymore (with 2013b version). I don't understand why this happened, as I had never setup matlab to hide folders and working directories. It just did it, somehow, and now I don't know how to access my working directory anymore. Can anyone help me please?

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by