Help files

Create a simple Process - Part 2

One of the most powerful features of WinAutomation is its use of Variables to carry information from one Action to another. This allows you to get information and then use it in later steps, copying data and using it, moving it, or incorporating it into other Actions. Now you will create a Folder as in the first example. This time, the name of the folder will be the time and date that it was created. This Process has practical applications: as you can create unique folders, differentiated by time - perhaps to organize pictures. To do this, you will need four steps: get the current time; change it from a time value to text, so it can be used as a name; create the folder with this name; and then put up a message that the Process is finished.First, of course, create, name, and open the new Process. The first Action is to Get Current DateTime under the category DateTime Actions.

getting started 2.1.png

Once we've Dragged and Dropped this Action, we want to retrieve the information to a Variable called "%CurrentDateTime%". This allows us to access the information later in the Process.

getting started 2.2.png

As you'll learn in Data Types, a DateTime value is not text, although it be used as such. But since a DateTime can be represented in many ways, to get it in the format that you prefer you'll have to convert the DateTime value to text with Convert DateTime to Text, under the category Text Actions.

getting started 2.3.png

In the Convert DateTime to Text property box, you will select the Variable you created in the last Action, "%CurrentDateTime%". For the Format to Use, choose Custom and look at how DateTimes are expressed: yyyy-MM-dd gives four digits for the year, two for the month, and two for the day - experiment here to see how different formats look - time is often hh:mm:ss). In this case enter yyyyMMdd-hhmmss to create a sortable representation of the current date and time

getting started 2.4.png

The output will be "%FormattedDateTime%" - now as text.

The final two Actions are the same as Example 1. You will Create a Folder with name "%FormattedDateTime%", and store the output to "%NewFolder%" and then Display a Message with a title, "New Folder Created" and the message,

"Folder:%NewFolder%has been created!"

getting started 2.5.png

Now, your Process Designer Window should look like this:


Again, run the Process to test it, and see that things work the way they should. If everything works well, exit and save the Process.