// Delete /Move/ Copy File and Remove Directory
static void deleteMoveCopyFolder(Args _args)
{
DialogField dialogFileName;
FilenameOpen fileNameOpen;
Dialog dialog;
Filename filePath;
Filename fileName;
Filename fileType;
FileName DestinationPath;
dialog = new Dialog();
dialogFilename = dialog.addField(extendedTypeStr(FileNameOpen));
DestinationPath = @'E:\Dest\';
if(dialog.run())
{
filenameOpen = dialogFilename.value();
[filePath, fileName, fileType] = fileNameSplit(fileNameOpen);
WinAPI::moveFile(fileNameOpen, DestinationPath+FileName+FileType);
WinAPI::copyFile(fileNameOpen, DestinationPath+FileName+FileType);
WinAPI::deleteFile(fileNameOpen);
}
}
Another :
System.IO.File::Move("C:\\test.txt", "D:\\test.txt");
static void deleteMoveCopyFolder(Args _args)
{
DialogField dialogFileName;
FilenameOpen fileNameOpen;
Dialog dialog;
Filename filePath;
Filename fileName;
Filename fileType;
FileName DestinationPath;
dialog = new Dialog();
dialogFilename = dialog.addField(extendedTypeStr(FileNameOpen));
DestinationPath = @'E:\Dest\';
if(dialog.run())
{
filenameOpen = dialogFilename.value();
[filePath, fileName, fileType] = fileNameSplit(fileNameOpen);
WinAPI::moveFile(fileNameOpen, DestinationPath+FileName+FileType);
WinAPI::copyFile(fileNameOpen, DestinationPath+FileName+FileType);
WinAPI::deleteFile(fileNameOpen);
}
}
Another :
System.IO.File::Move("C:\\test.txt", "D:\\test.txt");
No comments:
Post a Comment