Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4

Thread: Folder Bug?

  1. #1
    Join Date
    Feb 2001
    Location
    Washington State
    Posts
    120

    Grin Folder Bug?

    My project creates and references folders on the user's system. I've discovered that if a folder has a one-character name, i.e. "x" AMS reads and displays this as "\x"

    This is true if the folder is created by AMS or otherwise.

    To find the folders I want, I've inserted a text file in each folder, and AMS looks for that specific file, then parses the path, using the "String - Parse Path" action, with the "Folder 2" option to display the last folder in the file path.

    All folders with names of 2 or more characters are created and displayed correctly, and all functions work fine.

    Trying to work with a folder with a 1-character name generates errors, because the program tries to look for "filepath\\x"

    I don't know if I've erred somewhere, because other than this, everything works great.

    Thanks.
    Last edited by pjborg; 11-08-2003 at 01:21 AM.

  2. #2
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    I have been able to replicate this problem. I hate to use the “B” word, but it’s not just you. I see the same problem. I came up with a quick work around. If you would like to check out my work around, download this zip file. Basically, I just check the returned path, and if the first character is a backslash, I get rid of it. I added Test 1 and Test 2 to replicate and verify this problem. Hope this helps.
    Attached Files

  3. #3
    Join Date
    Feb 2001
    Location
    Washington State
    Posts
    120
    Thanks very much!

    I just discovered that modifying the variable with a string operator seems to work ok too, at least in my project:

    %ParsedFolder% = Evaluate (%ParsedFolder% - \\)

    In the future I'll be more circumspect with my use of that "B"word.

  4. #4
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    Glad you got it working for you. That’s one of the things I love most with AMS, there always seems to be more than one way to do something. I guess it all depends on where your brain happens to be at the moment. Actually, when I think about it today, I should have just used the String Replace function, and replaced any backslashes with nothing, effectively removing any and all of them with a singe line of code. Like I said, it’s all about where your brain happens to be at the moment.

    I’m happy that you pointed out this problem. It’s something that I have never ran into, something I never even thought about before. Now it’s something I’ll have to watch for in my own projects. Good info, thanks.

Posting Permissions

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