复制代码
- @echo off
- setlocal enabledelayedexpansion
- set /p n=请输入要删除的文件开始序号并回车(例如21):
- for /f "delims=" %%a in ('dir /a-d /s /b *.swf *.png') do (
- set f=%%~na
- for /f "delims=1234567890" %%i in ("!f!") do if not "%%i"=="" set f=1
- if !f! geq %n% del /q "%%a"
- )
复制代码
- D:\Script\TEST\003>123
- 请输入要删除的文件开始序号并回车(例如21):21
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\21.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\22.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\23.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\24.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\25.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\26.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\27.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\28.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\29.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\30.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\31.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\32.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\33.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\34.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\35.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\36.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\37.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\38.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\39.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\40.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\41.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\42.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\43.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\44.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\45.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\46.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\47.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\48.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\49.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\50.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\51.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\52.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\53.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\54.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\55.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\56.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\57.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\58.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\59.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\60.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\61.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\62.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\63.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\64.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\65.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\66.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\67.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\68.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\69.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\70.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\71.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\72.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\73.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\74.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\75.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\76.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\77.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\78.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\79.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\80.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\81.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\82.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\83.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\84.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\85.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\86.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\87.swf"
- del /q "D:\Script\TEST\003\0cb4l5g79sp0yyr5.swf\88.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\21.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\22.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\23.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\24.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\25.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\26.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\27.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\28.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\29.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\30.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\31.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\32.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\33.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\34.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\35.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\36.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\37.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\38.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\39.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\40.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\41.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\42.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\43.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\44.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\45.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\46.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\47.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\48.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\49.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\50.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\51.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\52.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\53.swf"
- del /q "D:\Script\TEST\003\f6m4gcvlg9s39fuh.swf\54.swf"
复制代码
- @echo off&color 0e
- set/p file_path=输入路径:
- set/p number=输入数字[大于或等于]的进行删除:
- for /f "delims=" %%i in ('dir/a-d/s/b/l/on "%file_path%\*.*"') do (
- if /i not "%%~ni"=="%%~nxi" (if /i "%%~xi"==".png" if %%~ni geq %number% del/f/q "%%i"
- if /i "%%~xi"==".swf" if /i "%%~xi"==".png" if %%~ni geq %number% del/f/q "%%i"
- )
- )
- pause
复制代码
- @echo off&color 0e
- set/p file_path=输入路径:
- set/p number=输入数字[大于或等于]的进行删除:
- for /f "delims=" %%i in ('dir/a-d/s/b/l/on "%file_path%\*.*"') do (
- if /i not "%%~ni"=="%%~nxi" (
- if /i "%%~xi"==".png" if %%~ni geq %number% del/f/q "%%i"
- if /i "%%~xi"==".swf" if %%~ni geq %number% del/f/q "%%i"
- )
- )
- pause
欢迎光临 批处理之家 (http://www.bathome.net/) | Powered by Discuz! 7.2 |