All pastes #781462 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-11-18 21:39 UTC
rendered paste body
(globals)
currentpath = os.getcwd() # C:\Python25
newpath = "blah"
counter = 0

########################################################################################################
#  DIRECTORY_CHANGE
def Directory_Change():
    if (counter < 1):
        currentpath = os.getcwd()
    else:
        currentpath = newpath
    os.system("cls")
    os.system("dir " + currentpath + " /A") # dir C:\Python25 /A
    print #skip line
    print #skip line
    print "What directory do you want to look at from here?"
    print "NOTE: '..' will take you back/up a directory."
    directory = raw_input("")#Lib
    newpath = currentpath + "\\" + directory# newpath = C:\Python25\Lib
    
    dummy=raw_input("Press any key to continue...")
    
    if (directory.lower() == "back"):
        os.system("cd ..")#wont work
    else:
        os.system("cls")
        os.system("dir " + newpath + " /A") # dir C:\Python25\Lib /A
        print #skip line
        print "Is the file you want to hide/unhide in this directory? [Yes/No]"
        isfileindir = raw_input("")
        if (isfileindir.lower() == "yes"):
            counter = 2
            Make_Choice()
        else:
            counter = 2
            Directory_Change()
            #currentpath = newpath # currentpath = C:\Python25\Lib