As part of a much larger VB macro I am trying to add an instruction through a VB script to rename a file without recourse to the rename dialog
The script creates two variables oldname and newname
Each, obviously takes a form like: E:\Imaging\Photographs\Spares\myfile.jpg
So I need to construct
ClickData.Func.Command.AddLine("RENAME oldname TO newname")
Whatever I do I can never get the command to work. The usual error from Windows is that "Windows cannot find the file "
I am sure that this is because I need some quotes around the variables in the statement as there are spaces in the variables. But I simply cannot work out how many quotes I need and where to put them.
Can you point me in the direction of some documentation to help me sort this quotes businerss out once and for all, please? I have scoured the help files for hours without success.