Create files with similar names using Java without overwriting existing file

后端 未结 4 815
忘了有多久
忘了有多久 2021-01-03 05:43

I was wondering if it is possible to create multiple files with similar names, without overwriting the current file.

for example: if I have a file: xyz.txt next tim

4条回答
  •  悲&欢浪女
    2021-01-03 06:13

    i want to know if there are any native java commands to stop overwriting [and append a numeral to the filename]

    Not in the core Java libraries, no.

提交回复
热议问题