473,387 Members | 1,766 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,387 software developers and data experts.

Shell Command Problem (Access 2002)

I have a batch file (RunFiles.bat) as follows:

Dir C: *.* /s > C:\AllFiles.txt

It copies all directories and subdirectories to a text file in the C:\
drive called AllFiles.txt

When I run RunFiles.bat by double-clicking it in Windows XP or running
it from Start->Run->C:\Runfiles.bat ...

....it creates the file AllFiles.txt with
233534 File(s) 44,990,114,384 bytes

However, when I run it with the following Shell Command in
Access:

Shell("C:\windows\system32\cmd.exe /c c:\RunFiles.bat", 1)

....it creates the file AllFiles.txt with only
676 File(s) 241,476,508 bytes

Any ideas on how to deal with this one? Thanks for any help.

RBollinger

Nov 13 '05 #1
1 1733
I think your batch file needs to be:

Dir C:\*.* /s > C:\AllFiles.txt

On the other hand, take a look at what Randy Birch has at
http://vbnet.mvps.org/code/fileapi/r...es_minimal.htm for how to use
APIs to do the same thing. Yes, it looks much more complicated, but you only
need to copy and paste, and it's very fast.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"robboll" <ro*****@hotmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
I have a batch file (RunFiles.bat) as follows:

Dir C: *.* /s > C:\AllFiles.txt

It copies all directories and subdirectories to a text file in the C:\
drive called AllFiles.txt

When I run RunFiles.bat by double-clicking it in Windows XP or running
it from Start->Run->C:\Runfiles.bat ...

...it creates the file AllFiles.txt with
233534 File(s) 44,990,114,384 bytes

However, when I run it with the following Shell Command in
Access:

Shell("C:\windows\system32\cmd.exe /c c:\RunFiles.bat", 1)

...it creates the file AllFiles.txt with only
676 File(s) 241,476,508 bytes

Any ideas on how to deal with this one? Thanks for any help.

RBollinger

Nov 13 '05 #2

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

Similar topics

4
by: Yann.K | last post by:
Hello. Using Tkinter, i would create a widget which display a shell command return. This return is long, and i would display a real time display (like with the tail -f commande on Linux) I...
1
by: Dennis Gaida | last post by:
Hi there, I want to upload some exported reports to a FTP Server, for this I use a command line FTP utility. My Database sits in C:\Documents and Settings\Dennis\My Documents\Database The FTP...
8
by: Stephen Long | last post by:
I'm looking for information on how i can open a remote command shell <cmd.exe> on a remote pc and perform basic DOS/Shell commands .. TIA Steve
4
by: RLN | last post by:
Re: Access 2003/WinXP Pro-SP3 I have a shell command that does not run correctly. I have two programs located on a file server: Pgm1.mdb and Pgm2.mdb Pgm1 launches Pgm2 via a command button...
4
by: Anastasios Hatzis | last post by:
I'm looking for a pattern where different client implementations can use the same commands of some fictive tool ("foo") by accessing some kind of API. Actually I have the need for such pattern for...
25
by: dennijr | last post by:
ok, shell always used to be easy for me, now its starting to get annoying cause i dont know wats wrong heres the simplist code possible: Private Sub IExplorer_Click() a = Shell("C:\Program...
3
by: Max Vit | last post by:
I have come across a strange issue whilst trying to use a shell command call from Access and have spent some time trying to figure this out but can't find the cause as yet. The issue is: I need...
14
by: xander.grespesky | last post by:
hi all, I'm looking for recommendations for unix "shell access" services that provide a c++ compiler (gcc or intel). free would be preferable. basically i'm looking at testing out some...
0
by: eerpini | last post by:
On Mon, 2008-11-17 at 01:56 -0800, James Kanze wrote: he was not referring to shell access using the system() call so that he could run shell commands. He was rather looking for a shell access...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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...

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.