Re: FILE_DELETE and FILE_CHMOD [message #42010] |
Wed, 15 December 2004 08:03  |
Michael Wallace
Messages: 409 Registered: December 2003
|
Senior Member |
|
|
Miguel Angel Cordoba wrote:
> Hi,
> I need to delete a directory in Windows and I use the IDL
> routine FILE_DELETE. The problem is at the file access
> permissions. I want to change the access permissions for all
> files and subdirectories off the directory using the FILE_CHMOD
> routine but this routine don't works in recursive mode.
> Any ideas?.
>
> Thanks.
>
Do a File_Search to get a list of all filenames within the directory and
then send that list to File_Chmod. I haven't tried it out, but I think
that should work.
files = File_Search("some_directory", "*")
File_Chmod, files, ...
-Mike
|
|
|
Re: FILE_DELETE and FILE_CHMOD [message #42082 is a reply to message #42010] |
Wed, 15 December 2004 23:24  |
Miguel Angel Cordoba
Messages: 13 Registered: April 2004
|
Junior Member |
|
|
Michael Wallace wrote:
> Miguel Angel Cordoba wrote:
>
>> Hi,
>> I need to delete a directory in Windows and I use the IDL
>> routine FILE_DELETE. The problem is at the file access
>> permissions. I want to change the access permissions for all
>> files and subdirectories off the directory using the FILE_CHMOD
>> routine but this routine don't works in recursive mode.
>> Any ideas?.
>>
>> Thanks.
>>
>
> Do a File_Search to get a list of all filenames within the directory
> and then send that list to File_Chmod. I haven't tried it out, but I
> think that should work.
>
> files = File_Search("some_directory", "*")
> File_Chmod, files, ...
>
> -Mike
Thank you Mike. It works!.
--
_________________________________________________________
Miguel Angel Cordoba
---------------------------------------------------------
Grup de Recerca Aplicada en Hidrometeorologia (GRAHI-UPC)
http://www.grahi.upc.edu
---------------------------------------------------------
Centre membre de la Xarxa d'Innovacio Tecnologica XIT
http://www.cidem.com/xarxait
_________________________________________________________
|
|
|