Batch file to delete all files in directory except for system files

تعرفه تبلیغات در سایت
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس

آرشیو مطالب

جستجوگر

یافته ها در جستجو

    امکانات وب

    برچسب ها

    Vote count: 0

    I'm trying to write a batch file, that would delete all files and directories in DELETE directory, except for a few "important" ones. I've tried to add attributes Hidden and System to the important files/directories. While it seems to work on the "del" command, "rmdir" still removes everything, regardless of attributes.

    @echo on
    
    attrib  important.txt +s +h
    attrib  folder +s +h
    attrib  picture.bmp +s +h
    attrib  delete.bat +s +h
    
    
    del *.* 
    rmdir /s /q C:UsersLenovoDesktopDELETE
    
    attrib  important.txt -s -h
    attrib  folder -s -h
    attrib  picture.bmp -s -h
    attrib  delete.bat -s -h
    
    pause
    

    Is there any way to do it?

    asked 1 min ago
    ForteAnother

    نویسنده : استخدام کار بازدید : 0 تاريخ : جمعه 21 مهر 1396 ساعت: 23:07
    برچسب‌ها :