Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2013
    Posts
    3

    Unanswered: VBS to clone a mde- File Path issue

    Hello!

    I'm using the script graciously provided by pkstormy, located here, and I am having a very simple problem. I can't get it to work with my setup using the UNC path I have.

    My path is:
    Code:
    \\SERVER\ABCDEF GHIJKLM\ABCDEF GHIJKLM.mde
    I've tried to shorten it to ABCDEF~1 in both cases, but it doesn't work. The script works perfectly when I use a mapped drive to eliminate the space in the file path. I can't break the space out of the path on the server, as other non-Access applications use the same folder.

    Shortening the actual .mde filename in the path to ABCDEF~1 does work. There are also several other folders that start with ABCDEF on my server:

    ABCDEF GHIJKLM WITH CHEESE
    ABCDEF GHIJKLM PIRATES
    ABCDEFLMNOP

    I know it's something stupid and simple on my end, but I've spent several hours staring and renaming the bloody path to no avail.

    Thank you for your time,
    Highlord Fox
    Last edited by HLFox; 10-25-13 at 14:51. Reason: Removed extra \ in path.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'm 99% sure that using:
    Code:
    LUName = """F:\MyDBFolder\MyMDBorMDEName.mde"""
    ...will produce what you want/need. Using this method is easier to type and to read but if it does NOT work, then I'm 100% certain that
    Code:
    LUName = Chr$(34) + "F:\MyDBFolder\MyMDBorMDEName.mde" + Chr$(34)
    ..will work.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Oct 2013
    Posts
    3
    Pat,

    Sadly, neither worked, same errors as before. I did some more dredging and surprisingly found someone with the same set of errors as I do, from 2011

    I'm winding up getting the same error message as he is-
    Line: 15
    Char: 1
    Error: Bad file name or number
    Code: 800A0034

    I'm now playing with the VBScript Functions to try and figure it out. =/

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so remove the spaces form your filenames and or directories
    bear in mind that file names (in the microsoft world) used to be 8.3

    you could try replacing spaces with the with the ANSI symbol for space chr(32)
    or replace the space with an underscore, then you will get a similar (pretty, hiuman readable) filename that should work

    Empty Spaces In File Name - Go4Expert suggests escaping the directory symbol

    I can't break the space out of the path on the server, as other non-Access applications use the same folder.
    I guess that should read you cvan remove the space, you just don't want too
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Oct 2013
    Posts
    3
    It seems I'm not the only one who is having this issue. I hunted around some VBA forums, and found some VBA advice from other people with the same problem. With their information, I updated the original script and got it to work. If anyone wants to look it over (I am a network engineer, not a coder >.<), I'd like to submit it or post it somewhere that people who are having this issue can use it.

    Thank you guys and/or gals for the help. If not for you, I wouldn't have been pushed in the correct direction far enough to find a solution.

    I guess that should read you cvan remove the space, you just don't want too
    And yes, I could, but don't want to. The remapping nightmare that would ensue is much worse than stressing over a single VB script. Plus, now it's fanciful!
    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
  •