/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Create Directory and place file into directory

12/03/2015 1302 views

Hello I want to create a VB script to do the following. (I have looked at some many scripts)

Create a directory under windows

           \windows\Sun\Java\Deployment

then place a file into that directory 

I have the file in Dependencies (so it will be placed in Kbots)


Thank you

1 Comment   [ + ] Show comment

Comments

  • I'm not sure what you want...
    Anything in this direction?

    Set oWsh = CreateObject("WScript.Shell")

    sRoot = oWsh.ExpandEnvironmentStrings("%Systemroot%")

    oWsh.Run "CMD /C MD " & sRoot & "\Sun\Java\Deployment",0,True
    oWsh.Run "CMD /C COPY C:\Windows\win.ini C:\Windows\Sun\Java\Deployment",0,True


Community Chosen Answer

3
Why don't you just use the File Sync under Distribution. It can create the folder and also copy the file down to that folder. 

http://www.itninja.com/blog/view/k1000-file-synchronization-tips-tricks-and-things-i-have-learned

The admin guide should also show you have to use it as well. No need to write a script if you just trying to copy something down to a machine. 
Answered 12/03/2015 by: nshah
Red Belt

All Answers

0
I'm not sure what you want...
Anything in this direction?

Set oWsh = CreateObject("WScript.Shell")

sRoot = oWsh.ExpandEnvironmentStrings("%Systemroot%")

oWsh.Run "CMD /C MD " & sRoot & "\Sun\Java\Deployment",0,True
oWsh.Run "CMD /C COPY C:\Windows\win.ini C:\Windows\Sun\Java\Deployment",0,True
Answered 12/03/2015 by: kitco
White Belt

0

Stop wasting time with VB when a good old DOS command will do it in a single line:

xcopy deployment.properties c:\windows\Sun\Java\Deployment


Answered 12/04/2015 by: vjaneczko
9th Degree Black Belt

0
Place file into directory? xcopy deployment. properties c:\windows\Sun\Java\Deployment. I also recommend using the File Sync under Distribution.
Answered 12/23/2015 by: AaronDonald
White Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ