[AccessD] Running Dir from Batch file in MSAccess
James Button
jamesbutton at blueyonder.co.uk
Wed Mar 15 12:11:16 CDT 2017
A bit late - but I have just been reminded that:
Windoze loads a .bat file into memory, and may continue processing 'lines' from
the original content even though the content may have been changed,
There is NO implied WAIT in a .bat files command processing - as in the second
command will be run, and fail because the first is still being actioned in a
sequence of
rmdir xx
mkdir xx
see /wait and the & and && operators
JimB
-----Original Message-----
From: James Button [mailto:jamesbutton at blueyonder.co.uk]
Sent: Sunday, March 12, 2017 10:18 PM
To: 'Access Developers discussion and problem solving'
<accessd at databaseadvisors.com>
Subject: RE: [AccessD] Running Dir from Batch file in MSAccess
I'll add some notes to the bat file usage - or maybe .cmd
Firstly you can setup a single bat (or .cmd) file and feed it parameters on the
call
As in a command dir %1 %2 >%3
And the call will be "ee.bat ""folder"" ""options"" ""outputfile"""
Secondly - remember that is a bat process - so you will need to have a
sufficient delay or wait process to allow it to work
Thirdly note the doubled "" within the outer bounding " pair
Foldernames etc. that contain spaces need to be bounded
And - finally, look at the FOR command and it's options
JimB
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jack
drawbridge
Sent: Sunday, March 12, 2017 8:09 PM
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Subject: [AccessD] Running Dir from Batch file in MSAccess
Jim,
I was trying to respond and say I agree that its a fast method. However,
the person I'm trying to help is not familiar with vba.
I got a flag on your email saying it is marked as spam??
So I'm starting again.
I am not experienced with Bat file from Access. I have had no luck with
google nor the forums I participate in.
I was trying to get a list of image files (jpg) and felt a simple Access
form with a Shell cmd would hide most everything.
But as always Simple has various meanings!!!
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