Hello.
i want to create program to find xfile and if found , then delete all folder and all xfile .
but this code not work.
anyone can help me please
Thanx
i want to create program to find xfile and if found , then delete all folder and all xfile .
but this code not work.
anyone can help me please

PHP Code:
Address = Input.GetText("Input13");
FileName = Input.GetText("Input14");
my_docs_path = Address ;
if (Application.GetLastError() == 0)then
search_results = File.Find(my_docs_path, "*promo*.*", true, true, nil);
error = Application.GetLastError();
if error ~= 0 then
Dialog.Message("Error",_tblErrorMessages[error]);
else
if (search_results == nil) then
Dialog.Message("Notice", "YourFile was not found in your folder.");
else
message = "YourFile was found in the following location(s). Click OK to delete the file(s):\r\n\r\n";
for index, path in pairs(search_results) do
message = String.Concat(message, path.."\r\n");
end
proceed = Dialog.Message("File Search Results", message, MB_OKCANCEL, MB_ICONQUESTION, MB_DEFBUTTON1);
if proceed == IDOK then
for i,v in pairs(search_results) do
Paths = String.SplitPath(search_results[i]);
File.Delete(Paths.folder, false, false, false, nil);
if (Application.GetLastError() ~= 0) then
Dialog.Message("Error", "The file located at: "..i.." could not be deleted.");
end
end
end
end
end