..
x_CopyCommand の簡単な使い方
{
tstring fdst = _T("E:/") ;
tstring path = _T("C:/Users/Public/Documents") ;
if (!x_CopyCommand::CheckFolderDST(fdst.c_str())) {
fdst = ::Path_AddLastSP(fdst) + x_Copy_RootDST ;
}
x_CopyCommand bc_cmd ;
{
bc_cmd.SetFolderDST(fdst.c_str()) ;
bc_cmd.SetFolderSRC(path.c_str()) ;
u_64 size_Max = 1024*1024*1024 ;
size_Max = 4*size_Max ;
bc_cmd.Set_SizeMax (size_Max) ;
bc_cmd.Set_r_MAX (true) ;
// bc_cmd.Set_pause (true) ;
bc_cmd.Execute(SW_MAXIMIZE,true) ;
}
}
x_CopyCommand 2024 での制限
- 2023 では,ソースが UNC 指定でない場合,区別されなかった.
2024 で,::W_get_remote_name により,DRIVE_REMOTE には対応できた.
x_CopyCommand::GetCopyDST (LPCTSTR src_path,LPCTSTR fold_) ::Get_computer_name() を使用して,ローカルドライブでも区別できる様に変更.
この関数は .../_Backup_/ の場合に,src_path の構成でコピー先を求める.
.../_Search_/__/DS220/Public/... の場合は,fold_ そのまま.
xcopy コマンドも含んでいるため,コードが少し煩雑.
1 つの BAT に 1 つの copy 動作しか含めることができない.
static tstring Get_dest_root (void) ;
static tstring Get_dest_path (c_tstring& src_path) ;
Daily_Copy .../Rescue/___/0/__/...
WS_get_dest_root C:/Users/Public/Documents/Temp/_Search_/__/
WS_get_dest_path C:/Users/Public/Documents/Temp/_Search_/__/(svr)/...
MWS_get_MWS_Root() C:/Users/Public/Documents/MICS/Temp/_Search/__/
WS_get_dest_path C:/Users/Public/Documents/MICS/Temp/_Search/__/(svr)/...
x_CopyCommand から r_CopyCommand の変更に伴い,次のものを削除
static x_CopyCommand::CheckIsLocal (LPCTSTR fold)
static x_CopyCommand::GetFolderDST (const bool f)
セキュリティ USB メモリ
RUF3-KEV64G-BK
ED-VT4/32G
MF-TRU332GBK