Click to See Complete Forum and Search --> : Could someone please check my code?


Omega234
April 23rd, 2008, 11:15 PM
There's something that's not quite working in my file here.

The object is for the program to create two files based on information input by the user. The first file is supposed to be a file named after the user, which contains the user's birthdate. It is supposed to be placed into the "users" folder.
The second file is supposed to be named after the day of the person's birthdate, and then it's supposed to be placed into a folder called "dates", and then under a folder with the user's birthdate's month as the name.

My code works somewhat fine... the problem comes when I try to move the files into their respective folders. If the folder "users" already exists, then the first file has problems moving. If the folder "dates" already exists, the second file has problems moving. If I delete all the folders and then run my program, the first file can move fine, but the second file still has problems, and I'm not sure why.

Could someone please check this code? The problem arises near these lines:
80
81
116
117
118

I think that I should add in an if statement to check if the folders exist, but I'm not sure how I should do that. Help, please?

(P.S. - the file is attached because it's 492 lines long, and that'd be a little much for people to read here.)

Thanks for any and all help!