/build/static/layout/Breadcrumb_cap_w.png

Create Directory and place file into directory

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
  • 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 - kitco 9 years ago

Answers (4)

Posted by: nshah 9 years ago
Red Belt
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. 
Posted by: kitco 9 years ago
White Belt
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
Posted by: vjaneczko 9 years ago
9th Degree Black 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


Posted by: AaronDonald 9 years ago
White Belt
0
Place file into directory? xcopy deployment. properties c:\windows\Sun\Java\Deployment. I also recommend using the File Sync under Distribution.
 
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