Question: I have a folder which has several files with .txt extension. I need to delete them but before that I need to take backup of it. 

For example, assume I have a folder with the following contents: 

```
name1.txt  
name2.txt   
name3.txt   
name4.txt   

```

After I delete, the contents of my folder should be: 

```
name1.txt.bkup  
name2.txt.bkup  
name3.txt.bkup  
name4.txt.bkup  

```

How can this be done?

Answer: 
try this:

```
copy *.txt *.txt.bkup
del *.txt

```
try this:

```
 for /r "C:\**" %%i  in (*.txt) do  rename %%i %%i.bkup
del *.txt

```