Dir > Command working from Access with Windows 2000 but not Windo

R

RMCompute

I created a batch file called CreateFileofFiles.bat to create a file of files
in the operating system. It contains the following code:

Dir Test*.* > FileTable.txt

It runs successfully from the operating system and I can run it from MS
Access Windows 2000 using the shell command:

Shell ("CreateFileofFiles.bat")

When I try to run the exact same code from MS Access on another computer
which uses Windows XP, it does not create the file. Does anyone have any
ideas? Could it be something unrelated to the fact that it is a different
operating system. I know it is executing the batch command because I put in
a pause in the batch command and I see it pausing, but it will not create the
file. Any help would be greatly appreciated. Thanks in advance.
 
K

kc-mass

Try adding the path to the line in the batch file like
Dir Test*.* > c:\FileTable.txt
or do a search for FileTable.Txt

My guess would be that it is being created but not where you think.

Reagrads
Kevin
 
R

RMCompute

Kevin,

Your guess was right on! It was creating the file in a directory a few
levels up. I coded all of the directory information in the batch file and it
worked fine.

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top