Advertisement
Guest User

Untitled

a guest
Jan 8th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.02 KB | None | 0 0
  1. 1 If Folder Does Not Exist("C:\install\pos\daily") Then
  2. 2 Create Folder "c:\install\pos\daily"
  3. 3 End If
  4. 4 If Folder Does Not Exist("C:\install\") Then
  5. 5 Create Folder "c:\install\"
  6. 6 End If
  7. 7 If Folder Does Not Exist("C:\install\pos\") Then
  8. 8 Create Folder "c:\install\pos\"
  9. 9 End If
  10. 10 If Folder Does Not Exist("C:\install\pos\dailybkup") Then
  11. 11 Create Folder "c:\install\pos\dailybkup"
  12. 12 End If
  13. 13 If Folder Does Not Exist("C:\install\pos\daily") Then
  14. 14 Create Folder "c:\install\pos\daily"
  15. 15 End If
  16. 16 If Folder Does Not Exist("C:\install\pos\Master Concept Lookup") Then
  17. 17 Create Folder "C:\install\pos\Master Concept Lookup"
  18. 18 Comment: Please enter the conditional commands here.
  19. 19 End If
  20. 20 Comment: *******************************GET UPDATED MASTER FILE********************
  21. 21 If File Does Not Exist("C:\Install\StoreInfo.txt") Then
  22. 22 Prompt Message: "Please provide the store number" Assign value of Prompt Message Box to Variable: "$Prompt-Assignment$"
  23. 23 Log to File: var1=$Prompt-Assignment$ in "C:\install\storeinfo.txt"
  24. 24 Prompt Message: "Please provide the SAP store number (add 150 in front of store number)" Assign value of Prompt Message Box to Variable: "$Prompt-Assignment$"
  25. 25 Log to File: var2=$Prompt-Assignment$ in "C:\install\storeinfo.txt"
  26. 26 Prompt Message: "What is the IP (or URL) of the sFTP Server you want to send these files to? (Outbound port 22)" Assign value of Prompt Message Box to Variable: "$Prompt-Assignment$"
  27. 27 Log to File: customFTPserver=$Prompt-Assignment$ in "C:\install\storeinfo.txt"
  28. 28 Prompt Message: "What is the user name for the sFTP server you wish to send these files to?" Assign value of Prompt Message Box to Variable: "$Prompt-Assignment$"
  29. 29 Log to File: customFTPuser=$Prompt-Assignment$ in "C:\install\storeinfo.txt"
  30. 30 Prompt Message: "What is the password for the sFTP server you wish to send these files to?" Assign value of Prompt Message Box to Variable: "$Prompt-Assignment$"
  31. 31 Log to File: customFTPpass=$Prompt-Assignment$ in "C:\install\storeinfo.txt"
  32. 32 Prompt Message: "Directory to send POS files to on your sFTP server "POS/daily/" no quotes " Assign value of Prompt Message Box to Variable: "$Prompt-Assignment$"
  33. 33 Log to File: customFTPposLOC=$Prompt-Assignment$ in "C:\install\storeinfo.txt"
  34. 34 Prompt Message: "Path of Enterprise File on sFTP server "POS/Master Concept Lookup" Location of MasterAA.txt file o" Assign value of Prompt Message Box to Variable: "$Prompt-Assignment$"
  35. 35 Log to File: customFTPmasterAA=$Prompt-Assignment$ in "C:\install\storeinfo.txt"
  36. 36 End If
  37. 37 Begin Error Handling; Action: Continue; Options: Log to File, Task Status: Fail
  38. 38 FTP/SFTP : Connect to "$customFTPserver$" (Secure FTP)
  39. 39 FTP/SFTP : Change Folder "$customFTPmasterAA$"
  40. 40 FTP/SFTP : Get File "MasterAAFile.txt"
  41. 41 FTP/SFTP : Disconnect
  42. 42 End Error Handling
  43. 43 If File Exists("C:\install\pos\Master Concept Lookup\MasterAAFile.txt") Then
  44. 44 Copy Files "C:\install\pos\Master Concept Lookup\MasterAAFile.txt" to "c:\install\MasterAAFile.txt"
  45. 45 Comment: Please enter the conditional commands here.
  46. 46 End If
  47. 47 Comment: **********************DATE VARIABLES**********************************************************************************************************************
  48. 48 String Manipulation : "$Date$" and assign to : $tempdate$
  49. 49 If File Exists("c:\install\pos\daily\*.*") Then
  50. 50 Delete Files "c:\install\pos\daily\*.*"
  51. 51 End If
  52. 52 Start Loop "$DailyPollDays$" Times
  53. 53 Comment: Please enter your commands to loop.
  54. 54 Variable Operation : $Date$-$Counter$ To $tempdate$
  55. 55 String Manipulation : "$tempdate$" and assign to : $TempDay$
  56. 56 String Manipulation : "$tempdate$" and assign to : $TempMonth$
  57. 57 String Manipulation : "$tempdate$" and assign to : $TempYear$
  58. 58 Variable Operation : $TempYear$$TempMonth$$TempDay$ To $ZIpDate$
  59. 59 Variable Operation : $var1$_$TempMonth$$TempDay$$TempYear$ To $DailyFileName$
  60. 60 If Folder Exists("D:\bootdrv\alohaqs\$ZIpDate$") Then
  61. 61 Start Loop " Each File in D:\bootdrv\alohaqs\$ZIpDate$"
  62. 62 Comment: Please enter your commands to loop. Use $filename$.$extension$ variable for each file name in the Loop.
  63. 63 Copy Files "d:\bootdrv\alohaqs\$ZIpDate$\$FileName$.$Extension$" to "c:\install\pos\daily\$var2$_$ZIpDate$_$FileName$.$Extension$"
  64. 64 End Loop
  65. 65 Comment: Please enter the conditional commands here.
  66. 66 End If
  67. 67 End Loop
  68. 68 If File Exists("c:\install\pos\daily\*.*") Then
  69. 69 Zip file(s) from "c:\install\pos\daily\" into file "C:\install\pos\dailybkup\$DailyFileName$.zip"
  70. 70 End If
  71. 71 If File Size ("C:\install\pos\dailybkup\$DailyFileName$.zip" Less than "1KB" ) Then
  72. 72 Begin Error Handling; Action: Stop Task ; Options: Log to File, Task Status: Fail
  73. 73 Comment: Please enter the conditional commands here.
  74. 74 End Error Handling
  75. 75 End If
  76. 76 Comment: Clean FTP folder to make sure it does not exist
  77. 77 Begin Error Handling; Action: Continue; Options: Task Status: Pass
  78. 78 FTP/SFTP : Connect to "$customFTPserver$" (Secure FTP)
  79. 79 FTP/SFTP : Change Folder "$customFTPposLOC$"
  80. 80 FTP/SFTP : Delete Remote File "$DailyFileName$"
  81. 81 FTP/SFTP : Put File "C:\install\pos\dailybkup\$DailyFileName$.zip"
  82. 82 FTP/SFTP : Disconnect
  83. 83 End Error Handling
  84. 84 Variable Operation : $Date$-15 To $DeleteDate$
  85. 85 Variable Operation : $Date$-15 To $DeleteDate$
  86. 86 If File Exists("C:\IFExport\food\*.*") Then
  87. 87 Delete Files "C:\IFExport\food\*.*" if file is modified before $DeleteDate$
  88. 88 Comment: Please enter the conditional commands here.
  89. 89 End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement