Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / August 2006

Tip: Looking for answers? Try searching our database.

Executing DOS Commands using a InfoPath Button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sam1996 - 14 Aug 2006 18:58 GMT
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'
Andy-IBIT - 18 Aug 2006 17:17 GMT
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

> Hi All,
>
[quoted text clipped - 3 lines]
> I want it to execute this DOS command below:
> mkdir c:\Marketing\'infopath data field value'
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.