Hi everyone,
this one is giving me troubles: I have two, three or four files named pic_day_hour_second.jpg, now I need a way to rename them in the order of creation, the oldest would be pic_1.jpg, the next pic_2.jpg.
Thanks for any hint.
Pick latest file
Moderators: JRL, Dorian (MJT support)
Something like this?
Code: Select all
//Set this folder name appropriately.
Let>FileLocation=c:\filerenametest
Let>RP_Wait=1
Let>RP_Windowmode=0
RunProgram>cmd /c dir %FileLocation%\*.jpg /od /b > %temp_dir%filerenametemptextfile
Wait>0.1
ReadFile>%temp_dir%filerenametemptextfile,vData
DeleteFile>%temp_dir%filerenametemptextfile
Separate>vData,crlf,vLine
Let>kk=0
Repeat>kk
Add>kk,1
Let>value=vLine_%kk%
RenameFile>%FileLocation%\%value%,%FileLocation%\pic_%kk%.jpg
Until>kk={%vLine_Count%-1}
MDL>Complete