windows - How can I write the text file content equal to file name? -


I have 100 empty text files whose content needs to be equal to their file name. An easy way to do this. is?

Thank you

I do not know what it is that you are looking for , But you can use the "forfiles" command:

  forfiles / m * .txt / c "cmd / c if @fsize equ 0 echo for example: in a.txt "A.txt".  

Update:

Only updated to move text files with size of zero (empty) .

Comments

Popular posts from this blog

Out of index C/C++ -

regex - PatternSyntaxException: while using String.ReplaceAll function in java? -

java - Projects which are accessed via multiple (different) IDEs: Ant or Maven? -