batch file - temporales - Eliminar es eliminar todo el directorio en lugar de archivos individuales
script para borrar archivos automaticamente (2)
Poner nombres de archivos entre comillas dobles ... (por ejemplo, "D: / My Program / test.exe")
Estoy ejecutando un archivo por lotes simple que es generado por vbscript para eliminar archivos individuales, sin embargo, cuando lo ejecuto, está eliminando subdirectorios enteros. Alguien tiene alguna idea sobre esto? A continuación se muestra el archivo por lotes.
rem 2008-12-15D:/DP-Production/Administrative/BUSINESS/FileLink
del D:/DP-Production/Administrative/BUSINESS/FileLink/.-1003067260 /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/.-997208891 /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/.-998224323 /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._proofing.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Sample1.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Shortcut (2) to PDFProofs.lnk /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Shortcut to Art.lnk /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Shortcut to Filelink on ''Admin-srv'' (I).lnk /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Shortcut to LeadGen program.lnk /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Shortcut to Mail.lnk /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Shortcut to Maintained on ''Data Pro (Pmi41)'' (H).lnk /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Shortcut to Openjobs on ''SRV-srv02'' (J).lnk /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._SHRP.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._skyphone2.bmp /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Smokey Bones Solo_Mailer.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._steakhouseback.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._steakhousefront.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Summercamp.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._taxsampleback.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._taxsamplefront.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Temporary Items /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Beta.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Trurdy.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Trash /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._trishwenrick.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._Tulane.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._valpak_price.mdb /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/._WasteM.jpg /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/weekly_deletions.vbs /q/f
rem 2008-12-15D:/DP-Production/Administrative/BUSINESS/FileLink/Art
del D:/DP-Production/Administrative/BUSINESS/FileLink/Art/._+.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Art/._0805_NJGolf 12-44-24.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Art/._806857.eps /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Art/._ADPLogo.JPG /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Art/._FranchiseLtr_MM.doc /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Art/._REPAIR-SMA.doc /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Art/._Safety.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Art/._Summer 2008 Donor V1.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Art/desktop.ini /q/f
rem 2008-12-15D:/DP-Production/Administrative/BUSINESS/FileLink/Mail
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/ BOBBSS LIST COUNT - DRIBOX 2008-06 ejs.msg /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/#7608 GHA MD Mailing.ZIP /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/2008 Adel List.xls /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/2008 mailing-BREAK OUT.xls /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/2008 Password Letter to GM (R).doc /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/2008 RL Mailing.xls /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/2008DLRCRICKPage1.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/805026.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/805442_Breakfast.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/806330_Letter.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/806778.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/806785 JONES WORLD VIEW DHL.xls /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/807364-807117.csv /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/8522435_INTDELIVERY.zip /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/8674252_INTDELIVERY.zip /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/8674856_INTDELIVERY.zip /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/8675351_INTDELIVERY.zip /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/8694521_INTDELIVERY.zip /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/8720608_INTDELIVERY.zip /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/8cletoy0903_1.csv /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/8roncar0657.csv /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/8vanhyu0531.zip /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/addressfile0605.xls /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/All Active Employee Address 070808.xls /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/APPA_Mailing_List-FINAL-XLS4.xls /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/Aug 08 Coupon Data.txt /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/BMA.pdf /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/BODYCOPY.doc /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/BOISE JUNE SALON MASTER LIST rev 6-9-08 (6).xls /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/Broward Committe REVISED.xls /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/CAW Tournament Letter (2).doc /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/detroit lasalle delete list.xls /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/CHIROPRACTOR 300.xls /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/CMTFV08204macroed.bak /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/Comm Ltr#2.doc /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/Contact Directory.rtf-MA /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/Copy of Jones Newsletter 0708.xls /q/f
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/Copy of MD L-Listing 07_11_08.xls /q/f
Voy a suponer que es por esta línea:
del D:/DP-Production/Administrative/BUSINESS/FileLink/Mail/ BOBBSS LIST COUNT - DRIBOX 2008-06 ejs.msg /q/
Observe el espacio allí, dice: Elimine todo en esa carpeta, luego elimine el archivo llamado BOBBSS, luego el archivo llamado LIST, luego el archivo llamado COUNT, luego ... uhm, error, luego el archivo llamado DRIBOX, etc.
Haga lo que dice Vincent Van Den Berghe , use "alrededor de los nombres de los archivos".