CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1

Threaded View

  1. #1
    Join Date
    Jul 2007
    Location
    127.0.0.1
    Posts
    72

    Could someone please check my code?

    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!
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured