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


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


This will just output the "TEST" string

input = Mid("410-TEST", InStr("410-TEST", "-")+1)
Answered 08/05/2006 by: AngelD
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity