MaCgyver Posted April 11, 2006 Share Posted April 11, 2006 I need to create an exe. I am working off of cmd file. I can do everything but handle this section of the file. SET FWR=%DISK%\%BATCH2%\FWR SET SYSINF=%JOBDIR%\SYSINF.DAT SET PRINT1=%FWR%\FEDWIRE.TXT Can anyone point me to the right section in the help file? Link to comment Share on other sites More sharing options...
MHz Posted April 11, 2006 Share Posted April 11, 2006 AutoIt does not need Set to assign variables. We just assign like: $FWR = $DISK & "\" & $BATCH2 & "\" & $FWR Well, the above does not translate your code, but I see just a part of DOS code, but I believe the above is a hint of how AutoIt works in comparison to the DOS equivalent line. Link to comment Share on other sites More sharing options...
MaCgyver Posted April 11, 2006 Author Share Posted April 11, 2006 (edited) AutoIt does not need Set to assign variables. We just assign like: $FWR = $DISK & "\" & $BATCH2 & "\" & $FWR Well, the above does not translate your code, but I see just a part of DOS code, but I believe the above is a hint of how AutoIt works in comparison to the DOS equivalent line. I think below is what I need. I found this in the helpfile. EnvSet -------------------------------------------------------------------------------- Writes an environment variable. EnvSet ( "envvariable" [, "value"] ) Edited April 11, 2006 by MaCgyver Link to comment Share on other sites More sharing options...
MaCgyver Posted April 11, 2006 Author Share Posted April 11, 2006 This is what I am building the autoit exe off of. CLS @ECHO OFF @ECHO ============================== JOB BUNRFWJ ============================== @ECHO. @ECHO FEDWIRE REPORT @ECHO. @ECHO ============================================================ @ECHO. SET FWR=%DISK%\%BATCH2%\FWR SET SYSINF=%JOBDIR%\SYSINF.DAT SET PRINT1=%FWR%\FEDWIRE.TXT @ECHO. @ECHO ============================== STEP 02 BUNRFW @ECHO. REM RUNBW BUNACC CALL D:\BNKTRADE\BATCH\SQLSYS\BUNRFW.EXE >> D:\BNKTRADE\SPOOL\BUNRFW.LOG @ECHO ============================== STEP PRINT CALL LCPRINT.CMD %PRINT1% @ECHO. @ECHO ============================== STEP DELETE @ECHO. :ENDJOB COPY %FWR%\OUTFILE.DAT %FWR%\OUTFILE.BKP IF EXIST %FWR%\OUTFILE.DAT DEL %FWR%\OUTFILE.DAT IF EXIST %JOBDIR%\SYSINF.DAT DEL %JOBDIR%\SYSINF.DAT @ECHO. @ECHO ============================== END JOB BUNRFWJ Link to comment Share on other sites More sharing options...
MHz Posted April 11, 2006 Share Posted April 11, 2006 I think below is what I need. I found this in the helpfile. EnvSet -------------------------------------------------------------------------------- Writes an environment variable. EnvSet ( "envvariable" [, "value"] )Rarely need to use it. Perhaps you do not need to use either. You Set a variable in DOS as Set Var=Variable Echo %Var% In AutoIt, you can do this $Var = "Variable" MsgBox(0, "This is a variable", $Var) If Exist would be the equivalent of FileExists() in AutoIt. Use the RunWait() function for BUNRFW.exe file. You can use @Comspec if you want, to pipe to file. FileDelete() to remove files that you list. Well, AutoIt does not not a CLS command as it is a Gui process, not DOS based (Cui). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now