Re: Revisit Shell Function

Tech-Archive recommends: Fix windows errors by optimizing your registry




"Mike Williams" <mikea@xxxxxxxxxxxxxxxxx> skrev i meddelandet
news:%23lOL8AetIHA.4876@xxxxxxxxxxxxxxxxxxxxxxx
"Marv" <marvwade@xxxxxxxxxxxxxxx> wrote in message
news:eB0sCydtIHA.1328@xxxxxxxxxxxxxxxxxxxxxxx

I feel like a totally idiot. I can't seem to get a handle
on this dam thing.
CopyBat = "C:\Combine.bat"
. . . lots of stuff snipped
I get the same problem that has plagued me from the start - "Run-time
Error 75 - Path/Fileaccess Error on
the Open statement. I just don't get it.

Why are you playing with .bat files? Why don't you try the code I posted?
It works fine, both with your short file names and with long file names.
Also, if you are going to play with .bat files (or any other temporary
files) then don't write them to the main c:\ root, as you are currently
doing, or you'll have serious problems in Vista.

Mike




F-ck my ISP!!

Sorry Mike, but I can't see Marvs post here. On Google there are 35 posts,
here I can see only 28!!

If he can't get it working with Shell, he's never gonna get it working in
code.

To Marv,
FileNum = FreeFile CopyBat = "C:\Combine.bat" FromPath = "C:\*.txt" ToPath
= "C:\WWW\Prices.txt" cmd = "Copy " & FromPath & " " & ToPath


Open CopyBat For Output As #FileNum Print #FileNum, cmd Close #FileNum
Shell (CopyBat)


The contents of Combine.bat is: Copy *.csv Prices.txt


With the code above, the result you say is in in Combine.bat is impossible!!

It should read as: Copy C:\*.txt C:\WWW\Prices.txt !

/Henning




.



Relevant Pages

  • SHELL
    ... I want to run/start a program from inside a .Net Windows application. ... tried using SHELL() but it only seems to work for some programs like ... notepad.exe and .bat files. ...
    (microsoft.public.dotnet.general)
  • Re: SHELL
    ... >> I want to run/start a program from inside a .Net Windows application. ... >> tried using SHELL() but it only seems to work for some programs like ... >> notepad.exe and .bat files. ...
    (microsoft.public.dotnet.general)
  • Re: SHELL
    ... > I want to run/start a program from inside a .Net Windows application. ... > tried using SHELL() but it only seems to work for some programs like ... > notepad.exe and .bat files. ...
    (microsoft.public.dotnet.general)