473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Variable %username% substitution on File Import Specification

I need to reference each user's (many) home share on a network and tried
using the Wndows %username% to do so but this did not work to reference the
directory where my import tables will be using the import specification.

my syntax for file to import was
\\ usrshare\ %username% \data\ foo.txt
Any help would be appreciated

d
Dec 2 '06 #1
2 2030
I dont think you would need the % around the username unless it has them in
the actual path.
I reacon it should be \\usrshare\username\data\foo.txt

You may need to stick the domain infront if its not the full path

hope that helps

"M Cavanagh" <m-********@earthlink.netwrote in message
news:8U*****************@newsread3.news.pas.earthl ink.net...
>I need to reference each user's (many) home share on a network and tried
using the Wndows %username% to do so but this did not work to reference the
directory where my import tables will be using the import specification.

my syntax for file to import was
\\ usrshare\ %username% \data\ foo.txt
Any help would be appreciated

d

Dec 2 '06 #2

M Cavanagh wrote:
I need to reference each user's (many) home share on a network and tried
using the Wndows %username% to do so but this did not work to reference the
directory where my import tables will be using the import specification.

my syntax for file to import was
\\ usrshare\ %username% \data\ foo.txt
Any help would be appreciated

d
use a function

Dim strPath as string
strPath = "\\usrshare\" & fOSUserName & "\data\foo.txt"

you can get the fOSUsername function here:
http://www.mvps.org/access/api/api0008.htm

Dec 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

166
by: Graham | last post by:
This has to do with class variables and instances variables. Given the following: <code> class _class: var = 0 #rest of the class
2
by: N. Graves | last post by:
I'm planning to develop a process to import data from an external flat file to a new table automatically. As usual I'm having a hard time getting started on the solution because of the Access's...
1
by: kollareddy | last post by:
Hi all, I am new to xml/xsd world. I want to know the differences between complex type and element being abstract and if both can be declared so, in case of substitution goups.Also can xsi:type...
3
by: mollyf | last post by:
Hello all-- I'm working on a legacy Access 2000 application which imports a space delimited text file. There's a line of code: DoCmd.TransferText acImportFixed, "ClaimSpecsEDS",...
5
by: Steve Richter | last post by:
I have a public variable ( "mZipServiceUrl" ) in my code behind class that I am able to substitute into the HTML of the .aspx file: <span onclick="WindowOpen('<%=mZipServiceUrl%>')"...
18
by: james | last post by:
Hi, I am loading a CSV file ( Comma Seperated Value) into a Richtext box. I have a routine that splits the data up when it hits the "," and then copies the results into a listbox. The data also...
1
by: David Berry | last post by:
Hi All. I'm looking for any help or sample code that can show me how to make a file import wizard in ASP.NET (VB preferred) like the one that MS Access uses. I'm working on a web site where the...
4
by: marc wyburn | last post by:
Hi I'm using SQlite and the CSV module and trying to create a class that converts data from CSV file into a SQLite table. My script curently uses functions for everything and I'm trying to...
1
by: Arya, Manish Kumar | last post by:
Hi, I am new to python. I have written a simple code to upload a file via ftp to remote server ------------- import sys import ftplib host=sys.argv
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.