If you have tried entering a variable in a path:

you may have come across the following error: "File to copy not found", even though the variable contains the correct filename and extension.
In WinAutomation the percent (%) char is a delimiter for expressions (or variables) but the \% combination equals to the literal % char. If, for example you want to display the message “50% of your disk is used”, you should write: “50\% of your disk is used”. In order to have a backslash and a % immediately after it (e.g. in a file path), you have to use the combination \\%.
So, in this example:
C:\My Files\%FileToCopy% will not work while
C:\My Files\\%FileToCopy% will work normally.
The reason for this behavior is that the backslash character is designed to behave like an escape character in case that you need to write the actual percent (%) character.
Post new comment