Question: There are 11 Webservices inside [service\_ccsl.txt](https://i.stack.imgur.com/Dw5av.jpg) After I am done with my work to make this text file handier instead of going and deleting manually, I'd like to integrate this Job in Jenkins task. Please, suggest me a way. Thanks in advance.

Answer: 
probably the easiest methods:

```
type nul > service_ccsl.txt

```

or 

```
break > service_ccsl.txt

```

or

```
echo. 2> service_ccsl.txt

```

as for a for loop:

```
@echo off
for %%f in (c:\test\*_ccsl.*) do echo type nul > %%f

```

The above example will loop through all files in `C:\test` and find anything that contains `_ccsl.` so it will match `service_ccsl.txt` `test_ccsl.txt` `anything_ccsl.exe` but it will not match `service_ccsl_all.txt` for instance.

You can play with the wildcards to fine tune your scenario, once you are happy your are confident, then remove the echo portion from the above piece of code.

This one will set the readonly attribute on for all files ending with \_all.txt
then we nul the files, access will be denied for the \_all.txt files the rest will be nulled, then we disable the readonly attribute.

```
@echo off
attrib +r "c:\test\*_all.txt"
for %%f in (c:\test\service*.txt) do type nul > %%f
attrib -r "c:\test\*_all.txt"

```

Note, that if you echo this, it will still echo the all.txt files as they are still readable, but the nul will not affect these files.
You can use `break` to erase all the contents of a file using batch script.

`break>\path\to\service_ccsl.txt`

You can add the above command in `Execute windows batch script` step in `Build` section of your job in Jenkins.