Doubt in SHFileOperation !!!
-
Hi All, Iam not able to delete a directory, which has more than three dot(.)s in its name using SHFileOperation. But iam able to delete directory will two dot(.)s. Why this happens? Eg. Iam able to delete directory named "1212.1212". But, Iam not able to delete directory named "192.168.1.133". I get message as "Cannot delete file: cannot read from source file or disk". but the directory is present. How can i delete this directory?? Is this due to Dos Name problem?? With Best Regards, A.Ilamparithi
-
Hi All, Iam not able to delete a directory, which has more than three dot(.)s in its name using SHFileOperation. But iam able to delete directory will two dot(.)s. Why this happens? Eg. Iam able to delete directory named "1212.1212". But, Iam not able to delete directory named "192.168.1.133". I get message as "Cannot delete file: cannot read from source file or disk". but the directory is present. How can i delete this directory?? Is this due to Dos Name problem?? With Best Regards, A.Ilamparithi
At a guess, it looks like the directory name is being interpreted as an IP address. You may need to prepend additional information ro fully qualify the actual location of the directory. e.g. "C:\192.168.1.133" Roger Allen - Sonork 100.10016 Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
-
At a guess, it looks like the directory name is being interpreted as an IP address. You may need to prepend additional information ro fully qualify the actual location of the directory. e.g. "C:\192.168.1.133" Roger Allen - Sonork 100.10016 Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
Hi I tried with full pathname only like the one you mentioned above. eg. SHFILEOPSTRUCT shFileOp; ZeroMemory(&shFileOp, sizeof(SHFILEOPSTRUCT)); _TCHAR *p="c:\\temp\\temp1\\192.168.1.133"; shFileOp.hwnd=NULL; shFileOp.wFunc=FO_DELETE; shFileOp.pFrom=p; //shFileOp.fFlags=FOF_SILENT/*|FOF_NOCONFIRMATION*/; SHFileOperation(&shFileOp); Regards, A.Ilamparithi
-
Hi I tried with full pathname only like the one you mentioned above. eg. SHFILEOPSTRUCT shFileOp; ZeroMemory(&shFileOp, sizeof(SHFILEOPSTRUCT)); _TCHAR *p="c:\\temp\\temp1\\192.168.1.133"; shFileOp.hwnd=NULL; shFileOp.wFunc=FO_DELETE; shFileOp.pFrom=p; //shFileOp.fFlags=FOF_SILENT/*|FOF_NOCONFIRMATION*/; SHFileOperation(&shFileOp); Regards, A.Ilamparithi
Isn't the filename supposed to be double null termainated. That may cause a problem... Address of a buffer to specify one or more source file names. These names can be either fully qualified paths, or standard DOS wild cards such as "*.*". Although this member is declared as a null-terminated string, it is used as a buffer to hold multiple file names. Each file name must be terminated by a single NULL character. An additional NULL character must be appended to the end of the final name to indicate the end of pFrom. John