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

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -