mercredi 10 août 2016

how to Generate a random number in dos that is not based on system clock

I want to create a random number in a dos batch file, that is not based on the system clock time.

i have been trying to use %RANDOM% but its not working well for my needs.

the reason is that i want to write file names that im recieving in muliple threads to files, and when i use the system time %random% method i get clashes between the files, since dos system time is based on seconds and not miliseconds.

so i need a way to generate random number based on something else other than system time..

anyone has any idea ?




Aucun commentaire:

Enregistrer un commentaire