Creating a folder from SQR
There are no system commands in SQR which allows creation of a folder. If a folder has to be created from a SQR then we can use call system to accomplish this.
Let us say if MyFolder is what needs to be created in 'C' drive then the Sample code to Create a folder from SQR is:
Let $folder = 'C:\MyFolder'
Let $cmd = 'mkdir ' $folder
call system using $cmd #status
Let us say if MyFolder is what needs to be created in 'C' drive then the Sample code to Create a folder from SQR is:
Let $folder = 'C:\MyFolder'
Let $cmd = 'mkdir ' $folder
call system using $cmd #status
But i ddi not find that code executed.
ReplyDeletecan u pls help me out in creating a new folder in C:\drive from SQR.
Tried ur code in sqr.
ReplyDeleteit is unable to create new folder.
Can u help it out.
thx in advance
Hi Keerthi,
DeleteI believe you must be running SQRs in Unix server. The above command creates a folder from running NT server. I am not sure, if you would be checking this here again, please share your contact details further in case of any issues.
hi shyam..i tried your code...its not working..i have #if def NT statement to check for NT server also..its still the same...do you have any suggestions please?
ReplyDelete