/build/static/layout/Breadcrumb_cap_w.png
08/08/2019 90 views

I have a script that verifies if a directory is there, if it is it unzips a shortcut to that location then delete the folder it came from. If the directory is not there I have it create the directory and then unzip the folder then delete the folder it came from.

The first part works if the directory is there it will unzip the file, copy the shortcut then delete the folder. However, if the directory is not there I am able to create the folder but when I try to unzip the folder and copy the shortcut it fails. I am unsure why because it works if the folder is there and I am able to create the folder.

Is there a better way to organize this? I can add more screenshots if needed.

Any help is much appreciated, thanks.


Answer Summary:
0 Comments   [ + ] Show comments

Comments


Answer Chosen by the Author

1

Made a separate script to verify the folder and create one if its missing.

Answered 08/08/2019 by: welcometothe
Senior White Belt

All Answers

1

Did you check wait for completion box for all the tasks?  Especially for the batch file that is remediation step one.  If  you did not, it side calls the window to run the batch and moves on to the next step and if the batch is not done failure!

Answered 08/08/2019 by: SMal.tmcc
Red Belt

  • The way I would do that is zip the excel.lnk file up and upload that zip to the script, under success create run a batch file task and use:

    If exist c:\VMGApps then goto copyit else goto makedir

    :makedir
    mkdir c:\VMGApps

    :copyit
    xcopy $(KACE_DEPENDENCY_DIR)\excel.lnk c:\VMGApps /q /t