AnsweredAssumed Answered

I have a folder and a file within it. I want to rename the folder. but the problem is when i use "ioctl(filesystem_handle, IO_IOCTL_RENAME_FILE,&rename_etruct);" instruction , it creates a copy of the folder with my new name , not renaming the folder.. is

Question asked by Abhijith S on Aug 21, 2015
Latest reply on Aug 25, 2015 by Iva Susnova

printf(New_folder_path, "a:\\%s",New_folder_name );

    //sprintf(New_File_path, "a:\\%s\\%s",New_folder_name,"no_log" );

    sprintf(New_File_path, "a:\\%s\\%s",folder_name,"yes_log" );

    MFS_RENAME_PARAM rename_etruct;

    char Old_path[50],New_path[50];

 

    strcpy(Old_path,File_path);

    strcpy(New_path,New_File_path);

    rename_etruct.OLD_PATHNAME = Old_path;

    rename_etruct.NEW_PATHNAME = New_path;

    error_code = ioctl(filesystem_handle, IO_IOCTL_RENAME_FILE,&rename_etruct);

Outcomes