Hello, when I browse our C using File Explorer, I see the server directory is like this "Shared (\\brilliant.sampl.abc.pqrs.org.org) (O
Can I just right the path in my backup VBA like this? Source = "\(\\brilliant.sampl.abc.pqrs.org.org) (O\xxxdatabase_be.accdb"
Thanks for any ideas
Also, your original question looks like you are asking whether this literal string would ever be a valid path:
Code:
\\brilliant.sampl.abc.pqrs.org.org (O):\filename
The answer is ... No, it wouldn't. The (O) is telling you that that network folder is mapped as O, and therefore files are referred to by path as O:\folder\folder\filename
OR, they are referred to as UNC path and filename: \\brilliant.sampl.abc.pqrs.org.org\filename
As Ranman said, it's a good idea to use UNC paths whenever you can, rather than *hoping* that the drive mapping will be existent, active and working at the time your code runs.
Occasionally, (and just today actually), I find it helpful to write code that maps a LONG unc path to a drive letter on-the-fly (and then kills it at the end of the code), because a lot of functions like Name() and filesystemobject's FileCopy tend to return troubles, like "path not found", with ultra-long paths. But that's a different story. Never hurts to know, though.
Also, your original question looks like you are asking whether this literal string would ever be a valid path:
Code:
\\brilliant.sampl.abc.pqrs.org.org (O):\filename
The answer is ... No, it wouldn't. The (O) is telling you that that network folder is mapped as O, and therefore files are referred to by path as O:\folder\folder\filename
OR, they are referred to as UNC path and filename: \\brilliant.sampl.abc.pqrs.org.org\filename
As Ranman said, it's a good idea to use UNC paths whenever you can, rather than *hoping* that the drive mapping will be existent, active and working at the time your code runs.
Occasionally, (and just today actually), I find it helpful to write code that maps a LONG unc path to a drive letter on-the-fly (and then kills it at the end of the code), because a lot of functions like Name() and filesystemobject's FileCopy tend to return troubles, like "path not found", with ultra-long paths. But that's a different story. Never hurts to know, though.
As an amplification, in our shop we had so many users with so many projects that already had drive-letter mappings that I had no choice but to use UNC mapping There was no drive letter I could use that worked for all 40 - 50 of my users.