I am writing a batch file and sending results to a file. I do not want the file overwritten everytime that i run it but i do want a seperate file for each time it is run so i am looking somehow to put some variable into the file name (for example time). So here is small example of what i want
Ipconfig/all >> file.txt ...........this works fine but the next time that i run the file i would like a something like file2.txt created.
The only other thing that i tried but was wrong syntax was trying to append the time at the end of the file. for example i tried the following
ipconfig/all >> file%time%.txt.
Help would be greatly appreciated. Thanks
Ipconfig/all >> file.txt ...........this works fine but the next time that i run the file i would like a something like file2.txt created.
The only other thing that i tried but was wrong syntax was trying to append the time at the end of the file. for example i tried the following
ipconfig/all >> file%time%.txt.
Help would be greatly appreciated. Thanks