home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1999 April / CD_Shareware_Magazine_31.iso / WIN95 / INTERNET / ftpctrl3b8.exe / %MAINDIR% / Scripts / Example14.ftp < prev    next >
Encoding:
Text File  |  1999-02-07  |  1.4 KB  |  44 lines

  1. ; *****************************************************
  2. ; Example14.ftp
  3. ; =============
  4. ; This example shows how to access the command line  
  5. ; parameters!
  6. ; If you are comfortable with the Windows enviroment you
  7. ; could try and create a shortcut to execute this script
  8. ; with parameters like this:
  9. ;  <FTP Control Path>\RunScript.exe <this FTP Script> Parameter1 Parameter2
  10. ; -----------------------------------------------------
  11. ; This example also shows the use of a few global variables:
  12. ;    NewLine
  13. ;    ScriptDir
  14. ;    FTPCtrlDir
  15. ;    CurrentLocalDir
  16. ;    WeekNumber
  17. ; -----------------------------------------------------
  18. ; NOTE: This is just a sample - for your information ;o)
  19. ; *****************************************************
  20.  
  21. ; ******* First provide the Login information...
  22.  
  23. Let A="Script files are located in %%ScriptDir%% %%NewLine%% FTP Control is located in %%FTPCtrlDir%% %%NewLine%% Current Local folder is %%CurrentLocalDir%%"
  24. Message "%%A%%"
  25.  
  26. Local-CD ".."
  27. Message "Current Local folder is now: %%CurrentLocalDir%%"
  28.  
  29. Message "Current WeekNumber is: %%WeekNumber%%"
  30.  
  31. if %%ParamCount%% > 0 then
  32.    Message "Commandline parameter 1 was: %%Param1%%"
  33. endif
  34.  
  35. if %%ParamCount%% > 1 then
  36.    Message "Commandline parameter 2 was: %%Param2%%"
  37. endif
  38.  
  39. if %%ParamCount%% > 2 then
  40.    Message "Commandline parameter 1 was: %%Param3%%"
  41. endif
  42.  
  43. ALLPARAMS Message "%%AllPar%%"
  44.