Login | |
|
 |
RE: HTA Question - 3/9/2006 10:14:17 AM
|
|
 |
|
| |
rOOs
Posts: 63
Score: 0
Joined: 2/28/2006
From: Switzerland
Status: offline
|
check for existing of a file is easy (If fsobject.Fileexists = True Then) output something to excel has 2 ways: output to ;-delimited csv file or directly to excel with create an instance of excel and send the commands to insert... filemoving is also simple in vbscript (copyfile or movefile method) directory: if fso.folderexists = False Then fso.createfolder Version 1 is always a good start... further developing is fun, and if its finished then you would like to start again and make everything written better :-)))) I think if you go on like that, you reach the goal of being able to script... I'll try to show you always the best way to do something ( or at least the best way i know of :-) ) ... So it's just after midnight here, i am going to sleep....
|
|
| |
|
|
|
 |
RE: HTA Question - 3/9/2006 6:07:14 PM
|
|
 |
|
| |
rOOs
Posts: 63
Score: 0
Joined: 2/28/2006
From: Switzerland
Status: offline
|
Browse for Folder goes like this: HTML: <input onDblClick=ChooseFolder() name='txtFolder' size=31 value=''> VBSCRIPT: Sub ChooseFolder On Error Resume Next Set objSA = CreateObject("Shell.Application") Set oFolder = objSA.BrowseForFolder(0, "Choose your Folder:", 0, document.all.item("txtFolder").Value) ' Choose the Folder, the document.all part reads the value in the field and will start form there when anything was given. If oFolder.Items.Item <> "" Then Set oFolderItem = oFolder.Items.Item document.all.item("txtFolder").innerText = oFolderItem.Path End If On Error GoTo 0 End Sub and so you can doubleclick on the input and choose the folder you want... then it places the path of the folder (even UNC) in the input box.. with another function you can take the txtFolder.Value and copy files... what you could do, is put your default path in the value tag of the input in the html section....
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|