zoukankan      html  css  js  c++  java
  • [BAT] 以当前时间为名创建文件夹,将本地文件夹里的文件拷贝到远程共享目录

    @echo off
    
    set sourcePath=D:DOAutomationTestautomation_do_ma_soapuiTestResultPA
    set targetPath=\szotwin2k801AutomationReportPA
    
    set directoryName=%date:~6,-4%-%date:~0,2%-%date:~3,2%-%time::=-%
    echo I will create a directory : +%directoryName%
    
    if exist %targetPath%\%directoryName% (echo y|cacls %targetPath%\%directoryName% /p everyone:f >nul 2>nul &&rd /s /q %targetPath%
    
    %directoryName%) else echo directory doesn't exist,create it
    
    md %targetPath%\%directoryName%
    xcopy /d %sourcePath% %targetPath%\%directoryName%
    
    rem delete reports generated 7 days ago
    forfiles /p %targetPath% /s /m *.* /d -7 /c "cmd /c del /f @path">nul 2>nul
    for /f "tokens=*" %%a in ('dir /b /ad /s^|sort /r') do rd "%%a" 2>nul
    
    exit
    

      文件夹名为 : 2015-07-28-10-34-04.09

  • 相关阅读:
    Python之socket_tcp
    Python之多进程&异步并行
    Qt forever关键字
    Qt程序在XP系统上不能正常运行
    Qt多线程的使用
    QScrollArea
    QtoolButton
    QComboBox
    Qt播放音频文件
    Qt5.9.1编译oracle驱动
  • 原文地址:https://www.cnblogs.com/MasterMonkInTemple/p/4650735.html
Copyright © 2011-2022 走看看