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