Okay,  I am *WAY* too rusty at this.  Here's what I got:

 

Set WshShell = WScript.CreateObject("WScript.Shell")

 

title = "New Project Folder"

instructions = "Enter the project number and name of the folder set you wish
to create."

foldername = "00000 - Sample Project"

templatefolder = "99999 - Project Template"

XCopyCMD = "XCOPY"

XCopySWCH = "/E /H /I /K /O"

 

foldername = InputBox(instructions, title, tempname)

 

executeCMD = XCopyCMD & chr(32) & templatefolder & chr(32) & foldername &
chr(32) & XCopySWCH

 

WshShell.Run(executeCMD)

 

When I run it, I get the Input box okay, but as soon as I click okay after
typing in some text, I get a quick dos pop up but nothing appears.

 

From: its.mike [mailto:[email protected]] 
Sent: Thursday, January 22, 2009 2:14 PM
To: NT System Admin Issues
Subject: RE: Retaining permissions when copying folders

 

yep.  Use InputBox from within VBScript to do the prompting.

 

There are 2 vbs methods for running an external program:  RUN and EXEC.

Run is easier; exec is more flexible (of course!).

 

..mike..

 

 

 

From: Jim Majorowicz [mailto:[email protected]] 
Sent: Thursday, January 22, 2009 2:04 pm
To: NT System Admin Issues
Subject: RE: Retaining permissions when copying folders

 

I figured out a way to do this easily with XCOPY.   I'd like to script this
but it's been so long I'm not even sure I remember where to begin.  I want
to do the following:

 

Once the script is executed:
Open a pop-up requesting the name and number of the new project in the
format xxxxx - <project name> (saved text)

Run the following command in the same directory as the script:

XCOPY "99999 - Project Template" "<saved text>" /E /H /I /K /O

 

Does that make sense or am I over thinking this?  Keep in mind that the new
folders need to be created by sales users and upper level managers.  If I
remember correctly, I can do this rather simply in VB then turn the VBS into
an EXE with the VB compiler.

 

 

From: Jim Majorowicz [mailto:[email protected]] 
Sent: Thursday, January 22, 2009 11:17 AM
To: NT System Admin Issues
Subject: Retaining permissions when copying folders

 

I've got a client that is trying to organize their file data a little better
across all of their departments.  Right now they're struggling with
duplicate data, changes made between departments not making it back to
original document.  However, some of the departments still want to protect
their data from tampering with permissions, but the fact that a copied
folder and file takes on the permissions of the destination folder puts a
damper on this idea.  I know ROBOCOPY has a way to do this, but I'm trying
find a simply way of copying a folder template, pasting it to the same
location and keeping the permissions that were set on the template, and do
it in a way that any user could do this task.

 

 

 

 

 

 

 

 

 

 

 

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to