Scripting in Lawson Windows

 4 Replies
 1 Subscribed to this topic
 27 Subscribed to this forum
Sort:
Author
Messages
KevinF
New Member Send Private Message
Posts: 2
New Member
This is a simple script in Unix but I cannot seem to get it right in Windows.  Does anyone have an example they would be willing to share.  
mikeP
Veteran Member Send Private Message
Posts: 151
Veteran Member

This is maybe too simple. It's a command file that we to assign to a token and run from a batch file in order to copy a display exec file from a folder that managed services trusts us to access, to the folder where it needs to live for mobile in basket.

:: Location for MIB html exec display files copy D:\lawdev\law\bpm\inbasketexecs\posum1_mib.htm D:\ibm\websphere\appserver\profiles\lawdev\installedapps\4Jlsfdevcellmanager01\lawdev-mib.ear\mib.war\html\inbasket\execs\posum1.htm dir D:\ibm\websphere\appserver\profiles\lawdev\installedapps\4Jlsfdevcellmanager01\lawdev-mib.ear\mib.war\html\inbasket\execs 

 

I also have some longer VBS scripts.

KevinF
New Member Send Private Message
Posts: 2
New Member
I am getting a file from a third party vendor.  I discovered today that sometime that file may not arrive.   So, I need to check to see if the file exist before I can do the cp or mv commands that currently are working fine.
mikeP
Veteran Member Send Private Message
Posts: 151
Veteran Member

Here's a piece of a VB script that checks for the existence of a folder, check for a file is similar. This could also be done in Powershell, but I didn't have time to delve into it when it was written. 

In my case at least, the script needs to be invoked by a CMD file that runs cscript:

 

cscript //nologo D:\lawdev\law\eugene\Vbs\histcopy.wsf %1 %2 

 

Here's the VBS code.  I don't know how to preserve the indents when posting here.

 



JimY
Veteran Member Send Private Message
Posts: 510
Veteran Member
Here is a perl script that I place in the gen/bin directory that checks for a file and if it is present will perform some commands.
[code] #!/Perl if (-s '\lawprod\law\prod\interface\EPIC_ITEMS') { system ('ftp -s:\lawprod\gen\bin\epiccmds 99.99.99.99') ; system ('\lawprod\gen\bin\epicmail.bat') ; print "File exists!\n" ; } else { print "File was not found or is empty!\n" ; } [/code]