• 复制学通C++的24堂课的指定目录数据到U盘


    str1 = 'md "I:\mr\%s\qjyy" && xcopy /e  "E:\学通C++的24堂课\mr\%s\qjyy" "I:\mr\%s\qjyy"'
    str2 = 'md "I:\mr\%s\sl" && xcopy /e  "E:\学通C++的24堂课\mr\%s\sl" "I:\mr\%s\sl"'
    str3 = 'md "I:\mr\%s\zmhh" && xcopy /e  "E:\学通C++的24堂课\mr\%s\zmhh" "I:\mr\%s\zmhh"'
    import os
    os.system("del xxcopy.bat")
    
    f = open("xxcopy.bat", "a")
    for i in range(1, 25):
        if i < 10:
            f.write(str1 % ("0"+str(i), "0"+str(i),"0"+str(i)))
            f.write("\n")
            f.write(str2 % ("0"+str(i), "0"+str(i),"0"+str(i)))
            f.write("\n")
            f.write(str3 % ("0"+str(i), "0"+str(i),"0"+str(i)))
            f.write("\n")
        else:
            f.write(str1 % (str(i),str(i), str(i)))
            f.write("\n")
            f.write(str2 % (str(i),str(i), str(i)))
            f.write("\n")
            f.write(str3 % (str(i),str(i), str(i)))
            f.write("\n")
    
    
    f.close()
    
    os.system("xxcopy.bat")
  • 相关阅读:
    bom案例2-弹出层
    bom案例1-div拖拽
    bom-scroll
    bom-client
    bom-offset
    9. 阻塞队列
    8. 读写锁
    7. CountDownLatch、CyclicBarrier、Semaphore
    6. Callable
    5. 集合不安全
  • 原文地址:https://www.cnblogs.com/pythonschool/p/2788245.html
Copyright © 2020-2023  润新知