I m trying to ren a folder from winrunner.but folder contains space in a name thats y winrunner not able to rename it.
dos_system("ren c:\My data\file.txt file2.txt")
Please tell me how this command will execute.
It won't execute. Check into using the "Escape" slash to force proper translation of the slash character.
You might need to slash-double quote the folder. Or, just rename your folder to one with no spaces.
Where should the missing semi-colon go?
the lack of double quotes around the folder name is what is cauing the problem - you are rquired to have those in a dos command if the path or file name contains any spaces. You could get away with out double slashing this one, but not recommeneded.
Insanity: doing the same thing over and over again and expecting different results
dos_system("ren \"c:\\My data\\file.txt\" \"file2.txt\"");
well well well after some search on net i got this and it is working fine.Please be specific while replying.
dos_system("ren C:\\" & "\"My data\"" & file.txt file2.txt);
There's no reason to concatonate.
I don't believe you that it's working - file.txt and file2.txt are not in quotes.