Dean Posted February 5, 2006 Report Share Posted February 5, 2006 Hello, I have a PVR application that creates a fixed name of 'capture.mpg' Everytime I want to perform a new capture, I first have to manually rename the captured file. I would like to have a macro that does this automatically. eg. If I have a macro that activates the stop button of my record application, it checks to see if a file called 'capture.mpg' exists, and if so renames it to something more meaningful like the current time/date.mpg I found the text command 'Date/Time' which saves the current time into a variable. (eg T1) What I want to know is can I use this variable in combination with a rename function? ..Dean.. Quote Link to comment Share on other sites More sharing options...
joe Posted February 5, 2006 Report Share Posted February 5, 2006 Hello Dean! Using the Date/Time command, store a formatted date/time string to a variable, say T1, and then use it in the Rename File or Files command. Like this: If File Exists "capture.mpg" Date/Time: Save "yyyy.mm.dd hh.mm" into %T1% Rename File or Files: "capture.mpg" End If <IFOTH:01:2:c:\temp\capture.mpg><DT:yyyy.mm.dd hh.mmT:01:1:><DOFILE:06:NN:c:\temp\capture.mpg>c:\temp\%T1%.mpg><ENDIF> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.