[AccessD] Running a Dir command from within Access vba
Rocky Smolin
rockysmolin at bchacc.com
Sun Mar 12 12:41:10 CDT 2017
Jack:
I use
strFilename = Dir$(varFolder & "\*.jpg")
where varFolder is returned from a folder picker function,
then iterate through the file names by:
Do while strFilename<>""
.
.
.
Stuff.
.
.
strFilename = Dir
loop
HTH
Rocky
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
jack drawbridge
Sent: Sunday, March 12, 2017 9:52 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Running a Dir command from within Access vba
Hi again,
Does anyone have sample vba to run a Dir command?
I'm trying to get a listing of all *.jpg files from a directory and its
subdirectories and put the list in a text file in a specific directory.
I can get this to work going to command prompt and entering the string
directly, but I want to do this from inside Access.
cd \users\mellon\documents\testImages Dir \s\b *.jpg >MyJpgs.txt
Thanks,
jack
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list