If the new name you want to assign to the files has white space within it, it can be done by adding double quotes around the file name. forfiles /S /M *.txt /C "cmd /c rename to Handling names with white spaces forfiles /S /M *.txt /C "cmd /c rename we can add a number to a file name. Here we try to add ‘Work’ to every txt file in the current folder and subfolders. If you want to add any prefix to file names, it can be done as in the below example. How to add a prefix to file names in batch You can use the batch files for many other simple actions like to delete files in bulk or to delete folders. Note! On this file, you can change the “rename “c:\*.txt” “?-Test1.*” command with the command you want, based on the task you want to archive described in this article.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |