Executing DOS Commands using a InfoPath Button

S

sam1996

Hi All,

I am looking for js script code for a button to create a user defined folder
using a infopath data filed...
For example when a user clicks a create folder button in InfoPath:
I want it to execute this DOS command below:
mkdir c:\Marketing\'infopath data field value'
 
A

Andy-IBIT

Sam

Why specifically a DOS command?
Surely it would easier to use some VBScript or JScript?
If you wanted a DOS call you would have to use one of the scripting
languages anyway

Just off the top of my head i'd do something like this in VBS

dim MyFileSystem , MyNewfolder, MyNewFolderPath

MyNewFolderPath = "c:\InfoPath\myfolder"

Set MyFileSystem = CreateObject("Scripting.FileSystemObject")
If Not MyFileSystem .FolderExists(MyNewFolderPath ) Then
Set MyNewfolder= MyFileSystem .CreateFolder(MyNewFolderPath )
End If


Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top