Moving a single file to a workstation

Comments

12 comments

  • TonsOFun

    Create a Batch file. use the xcopy or copy command. 

    the batch file will be your "setup" file when creating a new package in deploy. 

    0
    Comment actions Permalink
  • Aaron Young

    Not sure of the exact format of the xcopy command in my batch file.  I'm not a very good .BAT programmer.  I spent about 4 hours yesterday trying to write this in a BAT file and also with VBscript and they all don't work. 

    Is PDQDeploy going to feed the workstation destination to my command file?

    0
    Comment actions Permalink
  • TonsOFun

    Here's a sample of what i use 

    ---------------------- Code starts -------------------

    c:
    cd \
    mkdir vmware
    xcopy \\server1\sccm\Software_Package\VMWare\Win7Ent32bit\DegCheck\*.* /Y /E /Q /H C:\vmware

    ---------------------Code Ends-------------------------------------

    In this, I have created a folder to place the files in. 

    xcopy is able to use the UNC path of the file, in your case, the INI file, and is copying to the local workstation's C:\VMWare folder that was created in the prior step. The switches used was just to omit any error messages (habit). 

     

    Hope this helps... you may want to look up on the switches of xcopy to see which would suit your needs. 

    0
    Comment actions Permalink
  • TonsOFun

    Ooops, didn't answer your question. 

    QUOTE: "Is PDQDeploy going to feed the workstation destination to my command file?"

    PDQ deploy acts as if you're sitting at the workstation itself running all the commands. 

    In the sample above, when i referenced C:\vmware, it's the local workstation (client) folder that the files are being copied to. 

    Hope that made sense. 

    0
    Comment actions Permalink
  • Shane Corellian

    TonsOFun shows a great method for copying files. If you are running Pro mode you can also use the Command step. I like doing this for rather simple copy functions.

    Like TonsOFun I place my files out on a network share. Then I have the copy command executed in a Command Step during deployment. Here is an example that I use to copy the file, config.ini, from a network share to the Program Files\MyApp directory on my targets.

    xcopy "\\Scranton\Deploy\Misc\config.ini" "C:\Program Files\MyApp\" /Y

     

    CopyIniFIle.png

    0
    Comment actions Permalink
  • Aaron Young

    Hmmm....I like the simple approach to putting the xcopy right in the command.  My version of it says "Install File" not "Command to run" though.

    0
    Comment actions Permalink
  • Aaron Young

     

    Oh wait.  I see the difference.

    0
    Comment actions Permalink
  • Aaron Young

    This is the command I'm running.

    xcopy "\\Server\Revit-HOME\Revit_Builds and Downloads\RAC 2010\revit.ini"  "C:\Program Files\AutoDesk\Revit Architecture 2010\Program\revittest.ini" /Y

    Even if I make it a command to run.  It returns an error code 2.

    0
    Comment actions Permalink
  • TonsOFun

    does that line work without using Deploy?

    0
    Comment actions Permalink
  • Aaron Young

    Yes, it does, but prompts me to decide on whether the origin file is a directory or a file and prompts me to press F or D.  I press F and it copies.

    I looked through the xcopy command switches and I don't see where I can force it to understand it's a file.

     

    0
    Comment actions Permalink
  • Aaron Young

     

    It doesn't appear you can supress this prompting.  Fortunately, it looks like the good old copy command will work in my instance since the destination directories exisit.

    It's working.

    0
    Comment actions Permalink
  • TonsOFun

    Glad it's working now. :) 

    Side note: xcopy is a powerful tool to use with Deploy. 

    Good thing you got exposed to it, cause i'm sure you will be seeing it a lot more in the future once you get heavily into remote deployment. :) 

    0
    Comment actions Permalink

Please sign in to leave a comment.