I am trying to create a fixlet through SWD Wizard wherein I need to transfer the entire folder to a different directory. Since there are no available action script for moving directories, I am planning to use OS commands executed through actionscript.
Not completely sure how the construction of the action script. I saw this one command for executing .bat file:
wait “{pathname of system folder & “\cmd.exe”}” /C “{(pathname of client folder of current site) & “__Download{(pathname of client folder of current site)}__Download\RunCleanWipe.bat”}”
Which makes me think that the format would be something like:
wait “{pathname of system folder & “\cmd.exe”}” /C
Can you give me ideas of how can I get the action script I need or atleast verify if the format is correct?
Thank you very much for the response Bill. I agree that the bat file can be simply ran that way but my main concern is moving the folder to another directory. The action script above is just a sample of using the OS OS commands executed through actionscript.
I tried the following action script below but the folder was not moved and resulted to an exit code=1:
wait “{pathname of system folder & “\cmd.exe”}” /C move C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite__Download\shutting C:\
Okay I think this alternative is what I can try out for the moving of folders. Just to confirm, the second set of command above would need to be on a bat file too which needs to go along with the folder I am moving and I need to execute this so that I can move the folder? Or these commands can already be added on the fixlet action script?
The command I tried earlier using the OS command worked:
wait “{pathname of system folder & “\cmd.exe”}” /C move C:\Program Files (x86)\BigFix Enterprise\BES Client_BESData\actionsite_Download\shutting C:\
The previous action I deployed, the C:\Program Files (x86)\BigFix Enterprise\BES Client_BESData\actionsite_Download\shutting does not have quotations and the quotations are needed because there is a space between BES and Client. Once I changed the command to the one below, it was able to transfer it:
wait “{pathname of system folder & “\cmd.exe”}” /C move “C:\Program Files (x86)\BigFix Enterprise\BES Client_BESData\actionsite_Download\shutting” C:\
I did try the copy before and the folders seem to be not copied but I haven’t tried the move command. Maybe there is something wrong with my format for the copy. I will try this too for both move and copy command. Thank you.
When you use either createfile or appendfile, the resulting file is stored in the client folder for that site - one level above the __Download folder. You can take advantage of that with relative pathing, instead of entering the entire “C:\Program Files (x86)…” path (and especially not assuming the “actionsite” site name. You also have the full system path in effect, so you don’t necessarily need the full path to cmd.exe (but you should disable 32-bit redirection). BUT there are known problems with “wait” or “waithidden” not doing a good job handling more than one quoted value on the command line, so you may be better off putting the command into a batch file.
A couple of options below…