Delete all of the folders: Use rd
Delete all files: with del
1, delete the specified directory jenkins workspace: allure generated files
code show as below:
@echo off echo %workspace%\test_result\allureReports\history echo %workspace%\test_result\allureReports\ rd/s/q "%workspace%\test_result\allureReports\history" del /q/a/f "%workspace%\test_result\allureReports\*.*"
Note: Execute shell or Execute Windows batch command using a text box, use: %% variable name , delete the path to add quotation marks , otherwise an error
2, delete files and folders code is as follows:
OFF @echo RD / S / Q " C: \ the Users \ Administrator \ Desktop \ New Folder \ New Folder " del / Q / A / C F: \ the Users \ Administrator \ Desktop \ New Folder \ * *.
@echo off flashback function, pause pause
OFF @echo
echo This is the first test line content
echo This is the contents of the test line 2
echo This is the contents of the test line 3
echo End
PAUSE