I have a pdf report that is created nightly by RoboTask and is saved to: C:\My Documents\dailystats.pdf
I need to move this file to a network drive but re-name it so that I keep an accumulation of the the report. I would like to concantenate the current windows system date to the end of the file name [i.e. dailystats200709014.pdf Once the file is renamed, it would be moved to the following drive/folder: G:\operate_stats\
Can the rename process described above be done through the file rename function in robotask or does this need to be accomplished through an external script? If it is script, can you provide one or point me in the right direction? THANKS.
File Rename with Current Date
File Rename with Current Date
Let's divide this task onto small parts.
1 Rename file. You ca do this by using {ExtractFileNameNoExt()} variable
{ExtractFileNameNoExt(C:\My Documents\dailystats.pdf)}{Year}{MonthNo}{Day}.pdf
2. Move file to another location. See "Copy/Move"
I recommend you use the following algorithm
set user variable NewFileName to {ExtractFileNameNoExt(C:\My Documents\dailystats.pdf)}{Year}{MonthNo}{Day}.pdf
rename C:\My Documents\dailystats.pdf to {NewFileName}
move file {NewFileName} to G:\operate_stats\
If needed I can write an example, but I think that you easily can do this yourself.
1 Rename file. You ca do this by using {ExtractFileNameNoExt()} variable
{ExtractFileNameNoExt(C:\My Documents\dailystats.pdf)}{Year}{MonthNo}{Day}.pdf
2. Move file to another location. See "Copy/Move"
I recommend you use the following algorithm
set user variable NewFileName to {ExtractFileNameNoExt(C:\My Documents\dailystats.pdf)}{Year}{MonthNo}{Day}.pdf
rename C:\My Documents\dailystats.pdf to {NewFileName}
move file {NewFileName} to G:\operate_stats\
If needed I can write an example, but I think that you easily can do this yourself.
File Rename with Current Date
Oleg,
Thanks..I will work on this over the weekend and post back if I cannot complete your suggestion....again, thank you for the reply. Take care.
Thanks..I will work on this over the weekend and post back if I cannot complete your suggestion....again, thank you for the reply. Take care.
File Rename with Current Date
Oleg,
One more question...where do I find a list of the commands and variables and their syntax, like the ones you used in your post. I think that these are Windows operating system variables, but I have no idea how you secured them [ {ExtractFileNameNoExt} {Year} ,etc. This list would be very helpful to me. Sorry if this is a "dumb" question. Thank you.
One more question...where do I find a list of the commands and variables and their syntax, like the ones you used in your post. I think that these are Windows operating system variables, but I have no idea how you secured them [ {ExtractFileNameNoExt} {Year} ,etc. This list would be very helpful to me. Sorry if this is a "dumb" question. Thank you.
File Rename with Current Date
It's very simple.
Open menu Options | Variables and you can see all system and user variables. Each system variable have short description. All system variables are divided for a few groups. I think that you need a very little efforts to learn more about existing system variables.
Also each action editor where you may use variables, have {V} button which helps you to select necessary variable and insert it into current field.
Open menu Options | Variables and you can see all system and user variables. Each system variable have short description. All system variables are divided for a few groups. I think that you need a very little efforts to learn more about existing system variables.
Also each action editor where you may use variables, have {V} button which helps you to select necessary variable and insert it into current field.