Re: Revisit Shell Function
- From: "Henning" <computer_hero@xxxxxxxxxxxx>
- Date: Wed, 14 May 2008 19:18:25 +0200
"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
.
- Follow-Ups:
- Re: Revisit Shell Function
- From: Mike Williams
- Re: Revisit Shell Function
- References:
- Revisit Shell Function
- From: Marv
- Re: Revisit Shell Function
- From: Marv
- Re: Revisit Shell Function
- From: Henning
- Re: Revisit Shell Function
- From: Marv
- Re: Revisit Shell Function
- From: Henning
- Re: Revisit Shell Function
- From: Marv
- Re: Revisit Shell Function
- From: Mike Williams
- Revisit Shell Function
- Prev by Date: Re: How to convert extra long strings into their equivalent Hex Strings in VBA (Word 2K)
- Next by Date: Re: How to convert extra long strings into their equivalent Hex Strings in VBA (Word 2K)
- Previous by thread: Re: Revisit Shell Function
- Next by thread: Re: Revisit Shell Function
- Index(es):
Relevant Pages
|