怎麼沒有在批處理文件複製文件不與數字字符開始批量
開頭,例如數字符複製文件我的目錄列表的:
12red.pcx
9red.pcx
96blue.pcx
alipro.pcx
那麼我只需要複製alipro。通過批量PCX
使用的文件複製此批代碼開頭編號字符:
@echo off
set Design_path=D:\
set USB_path=E:\usb\
set t12=12*.pcx
set t9=9*.pcx
set t6=6*.pcx
set tsize=*.pcx
set design12=Dis_12
set design9=Dis_9
set design6=Dis_6
set designsize=D_Size
rem // Create Dir if not exist
if not exist %Design_path%%design12% (mkdir %Design_path%%design12%)
if not exist %Design_path%%design9% (mkdir %Design_path%%design9%)
if not exist %Design_path%%design6% (mkdir %Design_path%%design6%)
if not exist %Design_path%%designsize% (mkdir %Design_path%%designsize%)
if exist %USB_path%%t12% copy %USB_path%%t12% %Design_path%%design12%
if exist %USB_path%%t9% copy %USB_path%%t9% %Design_path%%design9%
if exist %USB_path%%t6% copy %USB_path%%t6% %Design_path%%design6%
如何與您的要求,您的代碼?至於請求。我會在('dir/B * .pcx^| findstr'^ [^ 0-9]'')中使用'for/f「delims =」%% a「做回聲複製%% A x:\ whereever' – LotPings
謝謝我的朋友 – AliReza
剛剛看到'%% a'有錯誤的不同套管 - 將它們改爲大寫或小寫。 – LotPings