Esempio n. 1
0
on = True;
while on:
    print "\n"
    print "1: Generate files from existing TXT or CSV."
    print "2: Sort existing files into the proper folders by name"
    print "3: Sort files according to a new and separate list"
    print "4: Quit"
    option = input("Enter your selection here:")

    if option == 4:
        on = False
    elif option == 1:
        getFile()
    elif option == 2:
        print "Please select the directory you would like sorted."
        path = askdirectory()
        path = os.path.abspath(path)
        print "inDir: ", path
        SortFileByName.sort(path)

    elif option == 3:
        print "Please select the CSV containing the list of names to be moved into another folder."
        inDir = askopenfilename()

        newDirName = input("Please enter the name of the new folder into which the files will be sorted.")
        SortFileByName.sortIntoDir(inDir, newDirName)
    else:
        print "\n That is not a valid input. Please try again. \n"

    print "Thanks for using Student Staff Selection Automation!"