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....
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)
Please log in to answer
Posted by:
AngelD
18 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.