Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating folder

Status
Not open for further replies.

tepsa

Technical User
Sep 12, 2010
1
HR
<hi, one begginer question. Is it posible any way to create folder with this
a = ltrim(str(nsif)) + '_' + substr(cgod,3,2)
md &a

problem is that bouth values are numbers for example nsif=12
cgod = 2010 and md should be 12_10.

thank's!
 
If the first variable is numeric and the second variable is a string then your code should work, simply enter the "RUN" command in the format shown below. I have taken the liberty to pre-select the drive and path for this example.

Code:
a = ltrim(str(nsif)) + '_' + substr(cgod,3,2)
SET DIRECTORY TO C:\Windows\Temp
RUN md &a

As a side note beware of using single characters "a" to "m" too much since (1) they can be nondescriptive and get lost in complex code and (2) in some scenarios they can represent a "work area" for tables or other specific purpose. The above code is fine, just a note.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top