Attached is the sample loadrunner file
In this example we are doing following activities via a loadrunner script
1. Create a direcotry named speforums in your C drive.
2. Execute a ping command and save it as a file inside c://speforums directory.
Attached is the working script file.Code:char filename, command; //define directory name char new_dir = "C:\\speforums"; // Create a directory under root called xyz and make it the current dir if (mkdir(new_dir)) lr_output_message ("Create directory %s failed", new_dir); else lr_output_message ("Created new directory %s", new_dir); //Define a filename sprintf(filename, "%s\\%s", new_dir, "pingfile_speforums.txt"); // Execute a ping command and direct it to a new file sprintf(command, "ping speforums.com >> %s", filename); system(command); lr_output_message ("Created new file %s", filename);
Contents of the file:
SPEForums need your contributions to build up a strong repository of performance engineering resources.
System Command Example In Loadrunner 2017-12-05
Making a command line (CMD) call through loadrunner