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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbs script to create folders + subfolders by input foldernames 1

Status
Not open for further replies.

TvdH1981

MIS
Mar 28, 2022
17
NL
Hello,

I am at this for a couple off days and totally new at this. This is what I got so far from google and youtube. It works and creates the folders, but I need the folders names from the inputboxes. I cant seem to get it work. Can somebody please help me. And also add some script for files that allrady exist so it looks at the date. just as you would add in a batch script \s \d.

I want to make this work

regards Tim



Option Explicit

DIM fSO

DIM foldername1
DIM foldername2
DIM foldername3

foldername1=INPUTBOX("KLANTNAAM")
foldername2=INPUTBOX("FENDERTYPE")
foldername3=INPUTBOX("ORDERNUMMER")

SET FSO=CreateObject("Scripting.FileSystemObject")

FSO.CREATEFOLDER("C:\Users\USERNAME\Desktop\TEST1\")
FSO.CREATEFOLDER("C:\Users\USERNAME\Desktop\TEST1\foldername1\")
FSO.CREATEFOLDER("C:\Users\USERNAME\Desktop\TEST1\foldername1\foldername2\")
FSO.CREATEFOLDER("C:\Users\USERNAME\Desktop\TEST1\foldername1\foldername2\foldername3\")

FSO.COPYFOLDER "C:\Users\USERNAME\Downloads","C:\Users\USERNAME\Desktop\TEST1\foldername1\foldername2\foldername3\"
 
Hi TvdH1981,

This works
Code:
Option Explicit

dim wshShell
set wshShell = wscript.CreateObject("WScript.Shell")
dim username
username = wshShell.Environment("Process")("USERNAME")
'wscript.echo username 

DIM fSO

DIM foldername1
DIM foldername2
DIM foldername3

foldername1=INPUTBOX("KLANTNAAM")
foldername2=INPUTBOX("FENDERTYPE")
foldername3=INPUTBOX("ORDERNUMMER")

dim folderpath
SET FSO=CreateObject("Scripting.FileSystemObject")

folderpath = "C:\Users\" & username & _
             "\Desktop\TESTT1\" 
wscript.echo "Creating folder: " & folderpath
FSO.CREATEFOLDER(folderpath)

folderpath = "C:\Users\" & username & _
             "\Desktop\TESTT1\" & _
             "\" & foldername1 
wscript.echo "Creating folder: " & folderpath
FSO.CREATEFOLDER(folderpath)

folderpath = "C:\Users\" & username & _
             "\Desktop\TESTT1\" & _
             "\" & foldername1 & "\" & foldername2 
wscript.echo "Creating folder: " & folderpath
FSO.CREATEFOLDER(folderpath)

folderpath = "C:\Users\" & username & _
             "\Desktop\TESTT1\" & _
             "\" & foldername1 & "\" & foldername2 & "\" & foldername3 
wscript.echo "Creating folder: " & folderpath
FSO.CREATEFOLDER(folderpath)
 
Thank you so much. One question still. Can anybody use this script on their computer? So I don't have to change each username?
 
That's the point of this line:

username = wshShell.Environment("Process")("USERNAME")
 
Is it correct you left out the copy part last line in my script. Where i copy files from a location to the newly created maps?
 
Code:
Is it correct you left out the copy part last line in my script. Where i copy files from a location to the newly created maps?
I left out the copy part only because I just didn't want to copy anything
 
Hi Again,

It works and creates the folders I want, but I can't create more folders after that under the same name. How can we do that?

Tim
 
Hi Tim,

Trying to create a folder which is already created throws the runtime error: File already exists

You could do following:

Either: Before you create every folder test if the folder does not already exist

Or: Use on the beginning of your script the statement
Code:
On Error Resume Next
This causes that, when an error occurs the script will not stop but continue on the next line.
 
Here is the modified script which works for me:
Code:
[COLOR=#804040][b]Option[/b][/color] [COLOR=#804040][b]Explicit[/b][/color]
[COLOR=#804040][b]On[/b][/color] [COLOR=#804040][b]Error[/b][/color] [COLOR=#804040][b]Resume[/b][/color] [COLOR=#804040][b]Next[/b][/color]

[COLOR=#804040][b]dim[/b][/color] wshShell
[COLOR=#804040][b]set[/b][/color] wshShell [COLOR=#804040][b]=[/b][/color] wscript[COLOR=#804040][b].[/b][/color][COLOR=#008080]CreateObject[/color][COLOR=#804040][b]([/b][/color][COLOR=#ff00ff]"WScript.Shell"[/color][COLOR=#804040][b])[/b][/color]
[COLOR=#804040][b]dim[/b][/color] username
username [COLOR=#804040][b]=[/b][/color] wshShell[COLOR=#804040][b].[/b][/color]Environment[COLOR=#804040][b]([/b][/color][COLOR=#ff00ff]"Process"[/color][COLOR=#804040][b])([/b][/color][COLOR=#ff00ff]"USERNAME"[/color][COLOR=#804040][b])[/b][/color]
[COLOR=#0000ff]'wscript.echo username [/color]

[COLOR=#804040][b]DIM[/b][/color] fSO

[COLOR=#804040][b]DIM[/b][/color] foldername1
[COLOR=#804040][b]DIM[/b][/color] foldername2
[COLOR=#804040][b]DIM[/b][/color] foldername3

foldername1[COLOR=#804040][b]=[/b][/color][COLOR=#008080]INPUTBOX[/color][COLOR=#804040][b]([/b][/color][COLOR=#ff00ff]"KLANTNAAM"[/color][COLOR=#804040][b])[/b][/color]
foldername2[COLOR=#804040][b]=[/b][/color][COLOR=#008080]INPUTBOX[/color][COLOR=#804040][b]([/b][/color][COLOR=#ff00ff]"FENDERTYPE"[/color][COLOR=#804040][b])[/b][/color]
foldername3[COLOR=#804040][b]=[/b][/color][COLOR=#008080]INPUTBOX[/color][COLOR=#804040][b]([/b][/color][COLOR=#ff00ff]"ORDERNUMMER"[/color][COLOR=#804040][b])[/b][/color]

[COLOR=#804040][b]dim[/b][/color] folderpath
[COLOR=#804040][b]SET[/b][/color] FSO[COLOR=#804040][b]=[/b][/color][COLOR=#008080]CreateObject[/color][COLOR=#804040][b]([/b][/color][COLOR=#ff00ff]"Scripting.FileSystemObject"[/color][COLOR=#804040][b])[/b][/color]

folderpath [COLOR=#804040][b]=[/b][/color] [COLOR=#ff00ff]"C:\Users\"[/color] [COLOR=#804040][b]&[/b][/color] username [COLOR=#804040][b]& _[/b][/color]
             [COLOR=#ff00ff]"\Desktop\TESTT1\"[/color] 
wscript[COLOR=#804040][b].[/b][/color]echo [COLOR=#ff00ff]"Creating folder: "[/color] [COLOR=#804040][b]&[/b][/color] folderpath
FSO[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]CREATEFOLDER[/color][COLOR=#804040][b]([/b][/color]folderpath[COLOR=#804040][b])[/b][/color]

folderpath [COLOR=#804040][b]=[/b][/color] [COLOR=#ff00ff]"C:\Users\"[/color] [COLOR=#804040][b]&[/b][/color] username [COLOR=#804040][b]& _[/b][/color]
             [COLOR=#ff00ff]"\Desktop\TESTT1\"[/color] [COLOR=#804040][b]& _[/b][/color]
             [COLOR=#ff00ff]"\"[/color] [COLOR=#804040][b]&[/b][/color] foldername1 
wscript[COLOR=#804040][b].[/b][/color]echo [COLOR=#ff00ff]"Creating folder: "[/color] [COLOR=#804040][b]&[/b][/color] folderpath
FSO[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]CREATEFOLDER[/color][COLOR=#804040][b]([/b][/color]folderpath[COLOR=#804040][b])[/b][/color]

folderpath [COLOR=#804040][b]=[/b][/color] [COLOR=#ff00ff]"C:\Users\"[/color] [COLOR=#804040][b]&[/b][/color] username [COLOR=#804040][b]& _[/b][/color]
             [COLOR=#ff00ff]"\Desktop\TESTT1\"[/color] [COLOR=#804040][b]& _[/b][/color]
             [COLOR=#ff00ff]"\"[/color] [COLOR=#804040][b]&[/b][/color] foldername1 [COLOR=#804040][b]&[/b][/color] [COLOR=#ff00ff]"\"[/color] [COLOR=#804040][b]&[/b][/color] foldername2 
wscript[COLOR=#804040][b].[/b][/color]echo [COLOR=#ff00ff]"Creating folder: "[/color] [COLOR=#804040][b]&[/b][/color] folderpath
FSO[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]CREATEFOLDER[/color][COLOR=#804040][b]([/b][/color]folderpath[COLOR=#804040][b])[/b][/color]

folderpath [COLOR=#804040][b]=[/b][/color] [COLOR=#ff00ff]"C:\Users\"[/color] [COLOR=#804040][b]&[/b][/color] username [COLOR=#804040][b]& _[/b][/color]
             [COLOR=#ff00ff]"\Desktop\TESTT1\"[/color] [COLOR=#804040][b]& _[/b][/color]
             [COLOR=#ff00ff]"\"[/color] [COLOR=#804040][b]&[/b][/color] foldername1 [COLOR=#804040][b]&[/b][/color] [COLOR=#ff00ff]"\"[/color] [COLOR=#804040][b]&[/b][/color] foldername2 [COLOR=#804040][b]&[/b][/color] [COLOR=#ff00ff]"\"[/color] [COLOR=#804040][b]&[/b][/color] foldername3 
wscript[COLOR=#804040][b].[/b][/color]echo [COLOR=#ff00ff]"Creating folder: "[/color] [COLOR=#804040][b]&[/b][/color] folderpath
FSO[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]CREATEFOLDER[/color][COLOR=#804040][b]([/b][/color]folderpath[COLOR=#804040][b])[/b][/color]
 
Well the klantnaam or clientname can have multiple folders within. What I want is multiple folders created in the same klantnaam or same fendertype
 
Oh what maybe is even more better if possible. That I can make a list of names for foldername1 so it's a pulldownmenu instead of a input name. Is this possible to create?

Thanks for all the help sofar
 
TvdH1981 said:
Oh what maybe is even more better if possible. That I can make a list of names for foldername1 so it's a pulldownmenu instead of a input name. Is this possible to create?

Hi Tim,

As far as I know, VbScript does not have drop-down list boxes, but you can do that as na HTA application (see
It would be something like this

2022-03-31_18h28_08_ozqq6p.png
 
Hi Tim,

I have already tried Proof Of Concept of the HTA application. Here is the source:

TvdH1981.hta
Code:
[COLOR=#008080]<[/color][COLOR=#008080]html[/color][COLOR=#008080]>[/color]
  [COLOR=#008080]<[/color][COLOR=#008080]head[/color][COLOR=#008080]>[/color]
    [COLOR=#008080]<[/color][COLOR=#008080]title[/color][COLOR=#008080]>[/color]TvdH1981[COLOR=#008080]</title>[/color]
    [COLOR=#008080]<[/color][COLOR=#6a5acd]HTA[/color][COLOR=#0000ff]:[/color][COLOR=#008080]APPLICATION[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]ID[/b][/color]=[COLOR=#ff00ff]"hta:ListBoxApp"[/color][COLOR=#008080] [/color]
[COLOR=#008080]    [/color][COLOR=#2e8b57][b]APPLICATIONNAME[/b][/color]=[COLOR=#ff00ff]"Folders Demo"[/color]
[COLOR=#008080]    [/color][COLOR=#2e8b57][b]SCROLL[/b][/color]=[COLOR=#ff00ff]"auto"[/color]
[COLOR=#008080]    [/color][COLOR=#2e8b57][b]SINGLEINSTANCE[/b][/color]=[COLOR=#ff00ff]"yes"[/color][COLOR=#008080]>[/color]
  [COLOR=#008080]</head>[/color]

[COLOR=#008080]<script language="VBScript">[/color]
  [COLOR=#804040][b]dim[/b][/color] objShell
  [COLOR=#804040][b]set[/b][/color] objShell [COLOR=#804040][b]=[/b][/color] [COLOR=#008080]CreateObject[/color][COLOR=#804040][b]([/b][/color][COLOR=#ff00ff]"WScript.Shell"[/color][COLOR=#804040][b])[/b][/color]

  [COLOR=#804040][b]dim[/b][/color] username
  username [COLOR=#804040][b]=[/b][/color] objShell[COLOR=#804040][b].[/b][/color]Environment[COLOR=#804040][b]([/b][/color][COLOR=#ff00ff]"Process"[/color][COLOR=#804040][b])([/b][/color][COLOR=#ff00ff]"USERNAME"[/color][COLOR=#804040][b])[/b][/color]
  
  [COLOR=#804040][b]dim[/b][/color] basefolderpath
  basefolderpath [COLOR=#804040][b]=[/b][/color] [COLOR=#ff00ff]"C:\Users\"[/color] [COLOR=#804040][b]&[/b][/color] username [COLOR=#804040][b]&[/b][/color] [COLOR=#ff00ff]"\Desktop\TESTT1"[/color]

  [COLOR=#804040][b]sub[/b][/color] Window_OnLoad
    self[COLOR=#804040][b].[/b][/color]resizeTo [COLOR=#ff00ff]600[/color][COLOR=#804040][b],[/b][/color] [COLOR=#ff00ff]400[/color]
    document[COLOR=#804040][b].[/b][/color]getElementById[COLOR=#804040][b]([/b][/color][COLOR=#ff00ff]"myFolder"[/color][COLOR=#804040][b]).[/b][/color]innerHTML [COLOR=#804040][b]=[/b][/color] basefolderpath
  [COLOR=#804040][b]end[/b][/color] [COLOR=#804040][b]sub[/b][/color]

  [COLOR=#804040][b]sub[/b][/color] createFolders
    [COLOR=#804040][b]On[/b][/color] [COLOR=#804040][b]Error[/b][/color] [COLOR=#804040][b]Resume[/b][/color] [COLOR=#804040][b]Next[/b][/color]

    [COLOR=#804040][b]dim[/b][/color] fso
    [COLOR=#804040][b]set[/b][/color] fso [COLOR=#804040][b]=[/b][/color] [COLOR=#008080]CreateObject[/color][COLOR=#804040][b]([/b][/color][COLOR=#ff00ff]"Scripting.FileSystemObject"[/color][COLOR=#804040][b])[/b][/color]

    folderpath [COLOR=#804040][b]=[/b][/color] [COLOR=#ff00ff]""[/color]
    [COLOR=#804040][b]if[/b][/color] PickCustommer[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]value[/color] [COLOR=#804040][b]<>[/b][/color] [COLOR=#ff00ff]""[/color]  [COLOR=#804040][b]and _[/b][/color]
       PickFenderType[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]value[/color] [COLOR=#804040][b]<>[/b][/color] [COLOR=#ff00ff]""[/color] [COLOR=#804040][b]and _[/b][/color]
       PickOrderNumber[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]value[/color] [COLOR=#804040][b]<>[/b][/color] [COLOR=#ff00ff]""[/color] [COLOR=#804040][b]then[/b][/color]
      [COLOR=#0000ff] ' create base folder[/color]
       folderpath [COLOR=#804040][b]=[/b][/color] basefolderpath
       [COLOR=#008080]MsgBox[/color] [COLOR=#ff00ff]"Creating folder: "[/color] [COLOR=#804040][b]&[/b][/color] [COLOR=#ff00ff]VbCrLf[/color] [COLOR=#804040][b]&[/b][/color] folderpath
       fso[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]CreateFolder[/color][COLOR=#804040][b]([/b][/color]folderpath[COLOR=#804040][b])[/b][/color]
       
      [COLOR=#0000ff] ' create folder1[/color]
       foldername1 [COLOR=#804040][b]=[/b][/color] PickCustommer[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]value[/color]
       folderpath [COLOR=#804040][b]=[/b][/color] folderpath [COLOR=#804040][b]&[/b][/color] [COLOR=#ff00ff]"\"[/color] [COLOR=#804040][b]&[/b][/color] foldername1
       [COLOR=#008080]MsgBox[/color] [COLOR=#ff00ff]"Creating folder: "[/color] [COLOR=#804040][b]&[/b][/color] [COLOR=#ff00ff]VbCrLf[/color] [COLOR=#804040][b]&[/b][/color] folderpath  
       fso[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]CreateFolder[/color][COLOR=#804040][b]([/b][/color]folderpath[COLOR=#804040][b])[/b][/color]

      [COLOR=#0000ff] ' create folder2[/color]
       foldername2 [COLOR=#804040][b]=[/b][/color] PickFenderType[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]value[/color]
       folderpath [COLOR=#804040][b]=[/b][/color] folderpath [COLOR=#804040][b]&[/b][/color] [COLOR=#ff00ff]"\"[/color] [COLOR=#804040][b]&[/b][/color] foldername2
       [COLOR=#008080]MsgBox[/color] [COLOR=#ff00ff]"Creating folder: "[/color] [COLOR=#804040][b]&[/b][/color] [COLOR=#ff00ff]VbCrLf[/color] [COLOR=#804040][b]&[/b][/color] folderpath  
       fso[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]CreateFolder[/color][COLOR=#804040][b]([/b][/color]folderpath[COLOR=#804040][b])[/b][/color]
        
      [COLOR=#0000ff] ' create folder3[/color]
       foldername3 [COLOR=#804040][b]=[/b][/color] PickOrderNumber[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]value[/color]
       folderpath [COLOR=#804040][b]=[/b][/color] folderpath [COLOR=#804040][b]&[/b][/color] [COLOR=#ff00ff]"\"[/color] [COLOR=#804040][b]&[/b][/color] foldername3
       [COLOR=#008080]MsgBox[/color] [COLOR=#ff00ff]"Creating folder: "[/color] [COLOR=#804040][b]&[/b][/color] [COLOR=#ff00ff]VbCrLf[/color] [COLOR=#804040][b]&[/b][/color] folderpath  
       fso[COLOR=#804040][b].[/b][/color][COLOR=#a020f0]CreateFolder[/color][COLOR=#804040][b]([/b][/color]folderpath[COLOR=#804040][b])[/b][/color]

       [COLOR=#008080]MsgBox[/color] [COLOR=#ff00ff]"Done."[/color]  
    [COLOR=#804040][b]end[/b][/color] [COLOR=#804040][b]if[/b][/color]
  [COLOR=#804040][b]end[/b][/color] [COLOR=#804040][b]sub[/b][/color]
[COLOR=#008080]</script>[/color]

[COLOR=#008080]<[/color][COLOR=#008080]body[/color][COLOR=#008080]>[/color]
  [COLOR=#008080]<[/color][COLOR=#008080]h1[/color][COLOR=#008080]>[/color]Creating Folders in:[COLOR=#008080]</h1>[/color]
  [COLOR=#008080]<[/color][COLOR=#008080]h2[/color][COLOR=#008080]><[/color][COLOR=#008080]span[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]id[/b][/color]=[COLOR=#ff00ff]"myFolder"[/color][COLOR=#008080]>[/color][COLOR=#008080]</span></h2>[/color]
  [COLOR=#008080]<[/color][COLOR=#008080]br[/color][COLOR=#008080]>[/color]
  [COLOR=#008080]<[/color][COLOR=#008080]p[/color][COLOR=#008080]>[/color]
    [COLOR=#008080]<[/color][COLOR=#008080]label[/color][COLOR=#008080]>[/color]Custommer:[COLOR=#008080]</label>[/color]
    [COLOR=#008080]<[/color][COLOR=#008080]select[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]size[/b][/color]=[COLOR=#ff00ff]"1"[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]name[/b][/color]=[COLOR=#ff00ff]"PickCustommer"[/color][COLOR=#008080]>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]""[/color][COLOR=#008080]>[/color]Select Custommer[COLOR=#008080]</option>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"Custommer01"[/color][COLOR=#008080]>[/color]Custommer #1[COLOR=#008080]</option>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"Custommer02"[/color][COLOR=#008080]>[/color]Custommer #2[COLOR=#008080]</option>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"Custommer03"[/color][COLOR=#008080]>[/color]Custommer #3[COLOR=#008080]</option>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"Custommer04"[/color][COLOR=#008080]>[/color]Custommer #4[COLOR=#008080]</option>[/color]
    [COLOR=#008080]</select>[/color]
  [COLOR=#008080]</p>[/color]

  [COLOR=#008080]<[/color][COLOR=#008080]p[/color][COLOR=#008080]>[/color]
    [COLOR=#008080]<[/color][COLOR=#008080]label[/color][COLOR=#008080]>[/color]Fender Type:[COLOR=#008080]</label>[/color]
    [COLOR=#008080]<[/color][COLOR=#008080]select[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]size[/b][/color]=[COLOR=#ff00ff]"1"[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]name[/b][/color]=[COLOR=#ff00ff]"PickFenderType"[/color][COLOR=#008080]>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]""[/color][COLOR=#008080]>[/color]Select Fender Type[COLOR=#008080]</option>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"FenderType01"[/color][COLOR=#008080]>[/color]FenderType #1[COLOR=#008080]</option>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"FenderType02"[/color][COLOR=#008080]>[/color]FenderType #2[COLOR=#008080]</option>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"FenderType03"[/color][COLOR=#008080]>[/color]FenderType #3[COLOR=#008080]</option>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"FenderType04"[/color][COLOR=#008080]>[/color]FenderType #4[COLOR=#008080]</option>[/color]
    [COLOR=#008080]</select>[/color]
  [COLOR=#008080]</p>[/color]

  [COLOR=#008080]<[/color][COLOR=#008080]p[/color][COLOR=#008080]>[/color]
    [COLOR=#008080]<[/color][COLOR=#008080]label[/color][COLOR=#008080]>[/color]Order Number:[COLOR=#008080]</label>[/color]
    [COLOR=#008080]<[/color][COLOR=#008080]select[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]size[/b][/color]=[COLOR=#ff00ff]"1"[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]name[/b][/color]=[COLOR=#ff00ff]"PickOrderNumber"[/color][COLOR=#008080]>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]""[/color][COLOR=#008080]>[/color]Select Order Number[COLOR=#008080]</option>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"OrderNumber01"[/color][COLOR=#008080]>[/color]OrderNumber #1[COLOR=#008080]</option>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"OrderNumber02"[/color][COLOR=#008080]>[/color]OrderNumber #2[COLOR=#008080]</option>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"OrderNumber03"[/color][COLOR=#008080]>[/color]OrderNumber #3[COLOR=#008080]</option>[/color]
      [COLOR=#008080]<[/color][COLOR=#008080]option[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"OrderNumber04"[/color][COLOR=#008080]>[/color]OrderNumber #4[COLOR=#008080]</option>[/color]
    [COLOR=#008080]</select>[/color]
  [COLOR=#008080]</p>[/color]

  [COLOR=#008080]<[/color][COLOR=#008080]input[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]type[/b][/color]=[COLOR=#ff00ff]"button"[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]value[/b][/color]=[COLOR=#ff00ff]"Create"[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]onClick[/b][/color]=[COLOR=#ff00ff]"createFolders"[/color][COLOR=#008080]>[/color]
[COLOR=#008080]</body>[/color]
[COLOR=#008080]</html>[/color]

Save the source as TvdH1981.hta and run it by doubble clicking.
 
this is nomething new. where do I put this source code? Not a notepadfile right?
 
I am getting the error message "this is not a valid win 32 file

Also I only need for the custommer to be a pulldown menu. The the other 2 field can be inputboxes

can I add the copy part for the folder somewhere?

Thnak u so much for helping out
 
You can copy the source into notepad and save it as a file with extension .hta e.g. TvdH1981.hta. Then to run it, double click on it.

I tested it on Windows 10.

Insert the copy part at the end of the subroutine createFolders before [tt]end if[/tt]


 
Well. It doesn't run. I did exactly that.. Saved as.hta. My laptop is still win 7 though
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top