1

NirCMD is a free command line utility. I am using it to take the screenshot at a fixed time interval. (NirCMD reference).

I am trying to get it index the image names so that it would be

img1.png
img2.png
img3.png

I found a way to get the datestamp, but cannot find how to add a simple index (e.g., 1, 2, 3 etc).

Here is the command line:

nircmd.exe loop 10 300000 savescreenshot C:\temp\img~$currdate.MM_dd_yyyy$.png

Can someone help with creating screenshot filenames to be img1.png, img2.png,..

I found this help on StackOverflow, but it is different from what I am looking for.

Thank you.

1

I cannot find how to add a simple index (e.g., 1, 2, 3 etc).

Use ~$loopcount$

Execute a NirCmd mutiple times, in a loop. Between the command executions, NirCmd will wait the number of Milliseconds specified in the second parameter. You can use the ~$loopcount$ variable to specify the call number in the loop (from 1 to n).

Source NirCmd Command Reference - loop

Try the following command line (not tested):

nircmd.exe loop 10 300000 savescreenshot C:\temp\img~$loopcount$.png
  • That is precisely what I wanted. Thank you so much. – Cricrazy Jan 22 '18 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.