Exemple #1
0
def DetermineBackupPath(params):   
    configPath = File.GetBackupPath()     
    #First determine if user has provided input
    if(len(params) >= 2):
        #user did provide input
        return params[1]
    else:
        #Not input, take from file
        if(configPath != ""):
            #Config file contains address, confirm from user
            console.PrintList(["Backup path="+configPath,63],0.02)
            response = input("")
            if(response.lower() == "y" or response.lower() == "yes"):
                return configPath
            elif(response.lower() == "n" or response.lower() == "no"):
                pass
            elif(response.lower() == "exit"):
                return None
        #Get input from user for backup path
        isValidPath = False
        while(not isValidPath):
            console.out(62)
            userInput = input("")
            if(File.DoesFolderExist(userInput)):
                return userInput
            elif(userInput.lower() == "exit"):
                return None
            else:
                console.out(-3)
Exemple #2
0
 def Backup(self, params):
     #Backup/Restore encrypted files to new path
     newPath = File.GetBackupPath()