/build/static/layout/Breadcrumb_cap_w.png

vbscript expertise

I created a script that takes the input and creates 4 folders and one sub folder in the last folder. The part I'm getting stuck at is the last folder, I want the input minus the first 4 characters..

The code I have is:
_______________________________________________________________

rem This will create all the folders necessary

Dim fso, l, a, b, c, d, f, g, i, j, k, m, n, Input, beforefile, afterfile,fldr,fc,f1
Set fso = CreateObject("Scripting.FileSystemObject")

Input = InputBox("Place name of your directory here starting with area code-.")
Set j = fso.CreateFolder("c:\FOLDER\" & Input & "")
Set a = fso.CreateFolder("c:\FOLDER\" & Input & "\DIR1")
Set b = fso.CreateFolder("c:\FOLDER\" & Input & "\DIR2")
Set d = fso.CreateFolder("c:\FOLDER\" & Input & "\DIR3")
Set i = fso.CreateFolder("c:\FOLDER\" & Input & "\DIR4")
Set n = fso.CreateFolder("c:\FOLDER\" & Input & "\DIR4\" & Input)
___________________________________________________________


So for example, if I put in 410-TEST in the above, it would create a directory at c: called "FOLDER" and then under that 4 Directories called DIR1, DIR2, DIR3, DIR4, and under DIR4 it would take the Input (410-TEST) and place a folder under DIR4 called 410-TEST

What I'm trying to do in this case would be to have the 410- taken out of DIR4 and it would just display "TEST".

Is this possible? Any help would be greatly appreciated....

0 Comments   [ + ] Show comments

Answers (1)

Posted by: AngelD 17 years ago
Red Belt
0
This will just output the "TEST" string

input = Mid("410-TEST", InStr("410-TEST", "-")+1)
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ