Does anyone know if it is possible to Move a Folder and all its contents in AMS5, or do you have to copy it first, then delete it?
Professional Software Development Tools
Does anyone know if it is possible to Move a Folder and all its contents in AMS5, or do you have to copy it first, then delete it?
?Code:File.Move("C:\\Folder\\*", "C:\\Destination\\");
Thanks for a quick response ShadowUK
I wondered if File.Move would do folders as well, however I can't seem to get the following code to work. Any Ideas?
FindFldr = Folder.Find(_DesktopFolder, "*", false, nil);
for index,fldrs in FindFldr do
Folder.Create("C:\\NewFolder");
StatusDlg.Show();
File.Move(fldrs, "C:\\NewFolder\\", true, true, false, true, nil);
StatusDlg.Hide();
if (error ~= 0) then
Dialog.Message("Error", tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
Dialog.Message("Success", "Moving ALL files from your Desktop was successful", MB_OK, MB_ICONINFORMATION);
end
end
end