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

ftp from Access: problems

DFS
From an Access 2003 module: v = Shell("ftp.exe -s:D:\ftpCommands.txt")

Contents of D:\ftpCommands.txt
----------------------------------
open ftp.destination.com
user password
send sourceFile destFile
bye
Results:
ftp> |o
invalid command
Any ideas?
Dec 15 '05 #1
29 2342
Send?

You're looking for Put

If you open a command window, start ftp and then enter ? at the ftp> prompt
it will list the valid ftp commands.
--
Terry Kreft

"DFS" <nospam@dfs_.com> wrote in message
news:S1******************@fe04.lga...
From an Access 2003 module: v = Shell("ftp.exe -s:D:\ftpCommands.txt")

Contents of D:\ftpCommands.txt
----------------------------------
open ftp.destination.com
user password
send sourceFile destFile
bye
Results:
ftp> |o
invalid command
Any ideas?

Dec 15 '05 #2
I suppose I should examine your script to find the error, but you could just
download my working FTP tool. It displays the FTP commands used to
download, upload, delete and get directory list ... and it works.

http://www.databasejournal.com/featu...le.php/3513061

--

Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com/datafast
"DFS" <nospam@dfs_.com> wrote ...
From an Access 2003 module: v = Shell("ftp.exe -s:D:\ftpCommands.txt")

Contents of D:\ftpCommands.txt
----------------------------------
open ftp.destination.com
user password
send sourceFile destFile
bye
Results:
ftp> |o
invalid command
Any ideas?

Dec 15 '05 #3
DFS
Terry Kreft wrote:
Send?

You're looking for Put

If you open a command window, start ftp and then enter ? at the ftp>
prompt it will list the valid ftp commands.
Send works fine. But the script never gets there.
ftp -s:D:\ftpCommands.txt ftp.destination.com

And it connects just fine, but errors out on the login.


"DFS" <nospam@dfs_.com> wrote in message
news:S1******************@fe04.lga...
From an Access 2003 module: v = Shell("ftp.exe
-s:D:\ftpCommands.txt")

Contents of D:\ftpCommands.txt
----------------------------------
open ftp.destination.com
user password
send sourceFile destFile
bye
Results:
ftp> |o
invalid command
Any ideas?

Dec 15 '05 #4
Ok, I opened my FTP Demo tool and found the syntax.

sExe = Environ$("COMSPEC")
sExe = Left$(sExe, Len(sExe) - Len(Dir(sExe)))
sExe = sExe & "ftp.exe -s:" & q & sScrFile & q

ShellWait sExe, vbHide

The end result of sExe is this ...
C:\WINDOWS\system32\ftp.exe -s:"C:\DBJ\Download.src"

This script works ...

open ftp.amazecreations.com
DBJUser
start123
cd DBJ
binary
lcd "C:\Desktop\DBJ"
get "text.txt" "C:\DBJ\test.txt"
bye

or this

open ftp.amazecreations.com
DBJUser
start123
cd DBJ
binary
lcd "C:\DBJ"
put "C:\DBJ\JustForKicks.txt"
bye

--

Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com/datafast

Send works fine. But the script never gets there.
ftp -s:D:\ftpCommands.txt ftp.destination.com

And it connects just fine, but errors out on the login.

Dec 15 '05 #5
DFS
Danny J. Lesandrini wrote:
Ok, I opened my FTP Demo tool and found the syntax.

sExe = Environ$("COMSPEC")
sExe = Left$(sExe, Len(sExe) - Len(Dir(sExe)))
sExe = sExe & "ftp.exe -s:" & q & sScrFile & q
The Environ$ setting is the key. Using it and regular old Shell, I got my
script to work.

Dim sExe As String
sExe = Environ$("COMSPEC")
sExe = Left$(sExe, Len(sExe) - Len(dir(sExe)))
sExe = sExe & "ftp -s:D:\upload.txt"
Shell sExe
(note you don't have to use a .scr file. A .txt file will work).

I like your ftp demo system, by the way, and I'm going to adapt parts of it
for use at my client site (mainly to check the nightly file upload). If
that's OK with you.

Thanks for your help.


ShellWait sExe, vbHide

The end result of sExe is this ...
C:\WINDOWS\system32\ftp.exe -s:"C:\DBJ\Download.src"

This script works ...

open ftp.amazecreations.com
DBJUser
start123
cd DBJ
binary
lcd "C:\Desktop\DBJ"
get "text.txt" "C:\DBJ\test.txt"
bye

or this

open ftp.amazecreations.com
DBJUser
start123
cd DBJ
binary
lcd "C:\DBJ"
put "C:\DBJ\JustForKicks.txt"
bye


Send works fine. But the script never gets there.
ftp -s:D:\ftpCommands.txt ftp.destination.com

And it connects just fine, but errors out on the login.

Dec 15 '05 #6
DFS
And you don't even have to go through the trouble of using Environ$ unless
Windows was installed differently than normal

Shell "C:\WINDOWS\System32\ftp -s:D:\upload.txt"

works fine.

DFS wrote:
Danny J. Lesandrini wrote:
Ok, I opened my FTP Demo tool and found the syntax.

sExe = Environ$("COMSPEC")
sExe = Left$(sExe, Len(sExe) - Len(Dir(sExe)))
sExe = sExe & "ftp.exe -s:" & q & sScrFile & q


The Environ$ setting is the key. Using it and regular old Shell, I
got my script to work.

Dim sExe As String
sExe = Environ$("COMSPEC")
sExe = Left$(sExe, Len(sExe) - Len(dir(sExe)))
sExe = sExe & "ftp -s:D:\upload.txt"
Shell sExe
(note you don't have to use a .scr file. A .txt file will work).

I like your ftp demo system, by the way, and I'm going to adapt parts
of it for use at my client site (mainly to check the nightly file
upload). If that's OK with you.

Thanks for your help.


ShellWait sExe, vbHide

The end result of sExe is this ...
C:\WINDOWS\system32\ftp.exe -s:"C:\DBJ\Download.src"

This script works ...

open ftp.amazecreations.com
DBJUser
start123
cd DBJ
binary
lcd "C:\Desktop\DBJ"
get "text.txt" "C:\DBJ\test.txt"
bye

or this

open ftp.amazecreations.com
DBJUser
start123
cd DBJ
binary
lcd "C:\DBJ"
put "C:\DBJ\JustForKicks.txt"
bye


Send works fine. But the script never gets there.
ftp -s:D:\ftpCommands.txt ftp.destination.com

And it connects just fine, but errors out on the login.

Dec 15 '05 #7
Nope that''s bad advice there are a whole host of systems I've seen where
windows is installed in the folder WinNT rather than Windows.

It's poor practice to hard code variables when there is a way to getthe
value dynamically anyway.
--
Terry Kreft

"DFS" <nospam@dfs_.com> wrote in message news:9n****************@fe02.lga...
And you don't even have to go through the trouble of using Environ$ unless
Windows was installed differently than normal

Shell "C:\WINDOWS\System32\ftp -s:D:\upload.txt"

works fine.

DFS wrote:
Danny J. Lesandrini wrote:
Ok, I opened my FTP Demo tool and found the syntax.

sExe = Environ$("COMSPEC")
sExe = Left$(sExe, Len(sExe) - Len(Dir(sExe)))
sExe = sExe & "ftp.exe -s:" & q & sScrFile & q


The Environ$ setting is the key. Using it and regular old Shell, I
got my script to work.

Dim sExe As String
sExe = Environ$("COMSPEC")
sExe = Left$(sExe, Len(sExe) - Len(dir(sExe)))
sExe = sExe & "ftp -s:D:\upload.txt"
Shell sExe
(note you don't have to use a .scr file. A .txt file will work).

I like your ftp demo system, by the way, and I'm going to adapt parts
of it for use at my client site (mainly to check the nightly file
upload). If that's OK with you.

Thanks for your help.


ShellWait sExe, vbHide

The end result of sExe is this ...
C:\WINDOWS\system32\ftp.exe -s:"C:\DBJ\Download.src"

This script works ...

open ftp.amazecreations.com
DBJUser
start123
cd DBJ
binary
lcd "C:\Desktop\DBJ"
get "text.txt" "C:\DBJ\test.txt"
bye

or this

open ftp.amazecreations.com
DBJUser
start123
cd DBJ
binary
lcd "C:\DBJ"
put "C:\DBJ\JustForKicks.txt"
bye

Send works fine. But the script never gets there.
ftp -s:D:\ftpCommands.txt ftp.destination.com

And it connects just fine, but errors out on the login.


Dec 16 '05 #8
Whoops, apologies, if I had taken my own advice and read the return from
?properly I would have seen it listed.

I always use Put hence my incorrect post.

--
Terry Kreft

"DFS" <nospam@dfs_.com> wrote in message
news:kb******************@fe04.lga...
Terry Kreft wrote:
Send?

You're looking for Put

If you open a command window, start ftp and then enter ? at the ftp>
prompt it will list the valid ftp commands.


Send works fine. But the script never gets there.
ftp -s:D:\ftpCommands.txt ftp.destination.com

And it connects just fine, but errors out on the login.


"DFS" <nospam@dfs_.com> wrote in message
news:S1******************@fe04.lga...
From an Access 2003 module: v = Shell("ftp.exe
-s:D:\ftpCommands.txt")

Contents of D:\ftpCommands.txt
----------------------------------
open ftp.destination.com
user password
send sourceFile destFile
bye
Results:
ftp> |o
invalid command
Any ideas?


Dec 16 '05 #9
On Fri, 16 Dec 2005 01:31:49 -0000, "Terry Kreft"
<te*********@mps.co.uk> wrote:

But it's somewhat reasonable to assume ftp.exe is installed in the
system32 folder, which by default is in the path. Actually the use of
ComSpec assumes that as well. So one might write:
Shell "ftp.exe -s:D:\upload.txt"

-Tom.

Nope that''s bad advice there are a whole host of systems I've seen where
windows is installed in the folder WinNT rather than Windows.

It's poor practice to hard code variables when there is a way to getthe
value dynamically anyway.


Dec 16 '05 #10
System32 is in the path on the majority of machines but I have come across a
significant number of machines where it is not.

--
Terry Kreft

"Tom van Stiphout" <no*************@cox.net> wrote in message
news:fp********************************@4ax.com...
On Fri, 16 Dec 2005 01:31:49 -0000, "Terry Kreft"
<te*********@mps.co.uk> wrote:

But it's somewhat reasonable to assume ftp.exe is installed in the
system32 folder, which by default is in the path. Actually the use of
ComSpec assumes that as well. So one might write:
Shell "ftp.exe -s:D:\upload.txt"

-Tom.

Nope that''s bad advice there are a whole host of systems I've seen where
windows is installed in the folder WinNT rather than Windows.

It's poor practice to hard code variables when there is a way to getthe
value dynamically anyway.

Dec 16 '05 #11
DFS
Tom van Stiphout wrote:
On Fri, 16 Dec 2005 01:31:49 -0000, "Terry Kreft"
<te*********@mps.co.uk> wrote:

But it's somewhat reasonable to assume ftp.exe is installed in the
system32 folder, which by default is in the path. Actually the use of
ComSpec assumes that as well. So one might write:
Shell "ftp.exe -s:D:\upload.txt"

That doesn't work - at least on my WinServer system. That's what prompted
my initial post.

I had to specify C:\Windows\System32\ftp, and it runs fine.

-Tom.

Nope that''s bad advice there are a whole host of systems I've seen
where windows is installed in the folder WinNT rather than Windows.
Hmmm... sounds ancient.
It's poor practice to hard code variables when there is a way to
getthe value dynamically anyway.


Probably, but the client machine uses C:\Windows\System32. So does 100% of
standard XP and Server 2003 installs.


Dec 17 '05 #12

In the business world operating systems do not tend to get upgraded until
the decision to do so is forced.

I spend a lot of time considering how to make my code generic and flexible
simply because there are a lot of systems out there which are not standard
installs, also there is nothing more likely to generate contempt from
professional developers than to find a system with hardcoded paths in it.

If you want to create inflexible code then that's entirely up to you, but
please don't pretend that there is any value to doing this except that it
allows you to be lazy.

--
Terry Kreft

"DFS" <nospam@dfs_.com> wrote in message
news:C9*****************@fe03.lga...
Tom van Stiphout wrote:
On Fri, 16 Dec 2005 01:31:49 -0000, "Terry Kreft"
<te*********@mps.co.uk> wrote:

But it's somewhat reasonable to assume ftp.exe is installed in the
system32 folder, which by default is in the path. Actually the use of
ComSpec assumes that as well. So one might write:
Shell "ftp.exe -s:D:\upload.txt"

That doesn't work - at least on my WinServer system. That's what prompted
my initial post.

I had to specify C:\Windows\System32\ftp, and it runs fine.

-Tom.

Nope that''s bad advice there are a whole host of systems I've seen
where windows is installed in the folder WinNT rather than Windows.
Hmmm... sounds ancient.
It's poor practice to hard code variables when there is a way to
getthe value dynamically anyway.


Probably, but the client machine uses C:\Windows\System32. So does 100%
of
standard XP and Server 2003 installs.

Dec 17 '05 #13
My idea is that I have written a really gnarly miserable class for FTP
which doesn't care where the FTP.exe file is.
BUT
I don't use it any more, because ADO gives me a simpler way to upload a
file and this simpler file uses a technology that is already there in
Access >= 2000.

Public Sub UploadFile( _
ByVal FromPath As String, _
ByVal ToFile As String, _
ByVal Server As String, _
Optional ByVal UserName As String, _
Optional ByVal Password As String)

Dim r As ADODB.Record
Dim s As ADODB.Stream
Set r = New ADODB.Record
Set s = New ADODB.Stream

r.Open Server & "/" & ToFile, , adModeWrite, adCreateOverwrite, ,
UserName, Password

With s
.Open r, , adOpenStreamFromRecord
.Type = adTypeBinary
.LoadFromFile FromPath
.Close
End With

r.Close

End Sub

In Windows XP if you don't send the UserName and Password you will be
prompted for same.

Dec 17 '05 #14
DFS
Terry Kreft wrote:
In the business world operating systems do not tend to get upgraded
until the decision to do so is forced.
You have clients still running NT on the desktop?

I spend a lot of time considering how to make my code generic and
flexible simply because there are a lot of systems out there which
are not standard installs, also there is nothing more likely to
generate contempt from professional developers than to find a system
with hardcoded paths in it.

If you want to create inflexible code then that's entirely up to you,
but please don't pretend that there is any value to doing this except
that it allows you to be lazy.
If you're telling me you have no hard-coded paths in any of your code, I'd
say... you're a liar.

Get over yourself.


"DFS" <nospam@dfs_.com> wrote in message
news:C9*****************@fe03.lga...
Tom van Stiphout wrote:
On Fri, 16 Dec 2005 01:31:49 -0000, "Terry Kreft"
<te*********@mps.co.uk> wrote:

But it's somewhat reasonable to assume ftp.exe is installed in the
system32 folder, which by default is in the path. Actually the use
of ComSpec assumes that as well. So one might write:
Shell "ftp.exe -s:D:\upload.txt"

That doesn't work - at least on my WinServer system. That's what
prompted my initial post.

I had to specify C:\Windows\System32\ftp, and it runs fine.

-Tom.
Nope that''s bad advice there are a whole host of systems I've seen
where windows is installed in the folder WinNT rather than Windows.


Hmmm... sounds ancient.
It's poor practice to hard code variables when there is a way to
getthe value dynamically anyway.


Probably, but the client machine uses C:\Windows\System32. So does
100% of
standard XP and Server 2003 installs.

Dec 17 '05 #15
DFS
And on the line beginning with r.Open Server, that code throws

"Error -2147217895 (80040e19)
Object or data matching the name, range, or selection criteria was not found
within the scope of this operation"

with this version (which compiles):

Dim Server As String, ToFile As String, FromPath As String
Dim r As ADODB.Record
Dim s As ADODB.Stream
Set r = New ADODB.Record
Set s = New ADODB.Stream

Server = "ftp.destination.com"
(I also tried ftp://ftp.destination.com)

ToFile = "Uploads/DFS_test4.html"

r.Open Server & "/" & ToFile, , adModeWrite, adCreateOverwrite, ,
"user", "password"

With s
.Open r, , adOpenStreamFromRecord
.Type = adTypeBinary
.LoadFromFile "D:\DFS.html"
.Close
End With

r.Close

Lyle Fairfield wrote:
My idea is that I have written a really gnarly miserable class for FTP
which doesn't care where the FTP.exe file is.
BUT
I don't use it any more, because ADO gives me a simpler way to upload
a file and this simpler file uses a technology that is already there
in Access >= 2000.

Public Sub UploadFile( _
ByVal FromPath As String, _
ByVal ToFile As String, _
ByVal Server As String, _
Optional ByVal UserName As String, _
Optional ByVal Password As String)

Dim r As ADODB.Record
Dim s As ADODB.Stream
Set r = New ADODB.Record
Set s = New ADODB.Stream

r.Open Server & "/" & ToFile, , adModeWrite, adCreateOverwrite, ,
UserName, Password

With s
.Open r, , adOpenStreamFromRecord
.Type = adTypeBinary
.LoadFromFile FromPath
.Close
End With

r.Close

End Sub

In Windows XP if you don't send the UserName and Password you will be
prompted for same.

Dec 17 '05 #16
I will just say I try not to use hard coded paths in production code.

In utilities that a developer might run from the VBE window I use hard
coded paths frequently, but I try to put the path at the top in a Const
so that it can be found and changed easily. But this is not production
code.

I find that trying very hard to use just Access, VBA, ADO, DAO and
various API functions in production code makes this whole question more
or less redundant.

Now when I say I try, of course, you could find hard coded paths in my
code. (e.g send e-mail with OE). It's because sometimes I'm in a hurry,
sometimes I'm careless and sometimes I've written something as an
example, which other have decided to use in production code,
(arghhhhhhh), like the OE send mail thing.

Does this mean that I am a liar?

I hope not. I hope it just reflects something like Joe Friday's quote:
(probably munged) "We recruit form the human race".

Dec 17 '05 #17
Probably it was "We recruit FROM the human race".

Dec 17 '05 #18
DFS wrote:
Terry Kreft wrote:
In the business world operating systems do not tend to get upgraded
until the decision to do so is forced.


You have clients still running NT on the desktop?


If NT is upgraded to 2000 or XP then the "Windows" folder will still be WinNT.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Dec 17 '05 #19

I have clients using Win98 and I cerainly have clients using WinNT.

Hard coding paths
Never in production work, concept and testing maybe it depends on how
trivial it is.

Accusing me of lying though, pretty much sums up your attitude doesn't it,
you obviously can't even deal with the concept that there are some people
who try to do their job properly and professionally rather than cludge it
like the amateur you appear to be.

Oh, and if "getting over myself" involves falling to your standards I think
I'll pass.

--
Terry Kreft

"DFS" <nospam@dfs_.com> wrote in message
news:tL*******************@fe04.lga...
Terry Kreft wrote:
In the business world operating systems do not tend to get upgraded
until the decision to do so is forced.


You have clients still running NT on the desktop?

I spend a lot of time considering how to make my code generic and
flexible simply because there are a lot of systems out there which
are not standard installs, also there is nothing more likely to
generate contempt from professional developers than to find a system
with hardcoded paths in it.

If you want to create inflexible code then that's entirely up to you,
but please don't pretend that there is any value to doing this except
that it allows you to be lazy.


If you're telling me you have no hard-coded paths in any of your code,
I'd
say... you're a liar.

Get over yourself.


"DFS" <nospam@dfs_.com> wrote in message
news:C9*****************@fe03.lga...
Tom van Stiphout wrote:
On Fri, 16 Dec 2005 01:31:49 -0000, "Terry Kreft"
<te*********@mps.co.uk> wrote:

But it's somewhat reasonable to assume ftp.exe is installed in the
system32 folder, which by default is in the path. Actually the use
of ComSpec assumes that as well. So one might write:
Shell "ftp.exe -s:D:\upload.txt"
That doesn't work - at least on my WinServer system. That's what
prompted my initial post.

I had to specify C:\Windows\System32\ftp, and it runs fine.


-Tom.
> Nope that''s bad advice there are a whole host of systems I've seen
> where windows is installed in the folder WinNT rather than Windows.

Hmmm... sounds ancient.

> It's poor practice to hard code variables when there is a way to
> getthe value dynamically anyway.

Probably, but the client machine uses C:\Windows\System32. So does
100% of
standard XP and Server 2003 installs.


Dec 17 '05 #20
I apologise. Because I use only sites that have both http and ftp
protocols enabled and that are MS friendly I have ignored the fact that
many are not like that and that the ADODB provider does not, TTBOMK,
recognize the FTP protocol.

Dec 17 '05 #21
DFS
Terry Kreft wrote:
I have clients using Win98 and I cerainly have clients using WinNT.

Hard coding paths
Never in production work, concept and testing maybe it depends on how
trivial it is.

Accusing me of lying though, pretty much sums up your attitude
That is your attitude. I'm 100% sure you have some hard-coded paths or
values out there in your code somewhere, yet you call me "lazy" for doing it
in this one instance - and in fact I *very rarely* hard-code any paths. I
usually tie them to an interface on which my users can enter or choose the
path.
doesn't it, you obviously can't even deal with the concept that there
are some people who try to do their job properly and professionally
rather than cludge it like the amateur you appear to be.

Oh, and if "getting over myself" involves falling to your standards I
think I'll pass.
But the fact is, you can't live up to your own standards.


"DFS" <nospam@dfs_.com> wrote in message
news:tL*******************@fe04.lga...
Terry Kreft wrote:
In the business world operating systems do not tend to get upgraded
until the decision to do so is forced.


You have clients still running NT on the desktop?

I spend a lot of time considering how to make my code generic and
flexible simply because there are a lot of systems out there which
are not standard installs, also there is nothing more likely to
generate contempt from professional developers than to find a system
with hardcoded paths in it.

If you want to create inflexible code then that's entirely up to
you, but please don't pretend that there is any value to doing this
except that it allows you to be lazy.


If you're telling me you have no hard-coded paths in any of your
code, I'd
say... you're a liar.

Get over yourself.


"DFS" <nospam@dfs_.com> wrote in message
news:C9*****************@fe03.lga...
Tom van Stiphout wrote:
> On Fri, 16 Dec 2005 01:31:49 -0000, "Terry Kreft"
> <te*********@mps.co.uk> wrote:
>
> But it's somewhat reasonable to assume ftp.exe is installed in the
> system32 folder, which by default is in the path. Actually the use
> of ComSpec assumes that as well. So one might write:
> Shell "ftp.exe -s:D:\upload.txt"
That doesn't work - at least on my WinServer system. That's what
prompted my initial post.

I had to specify C:\Windows\System32\ftp, and it runs fine.

>
> -Tom.
>
>
>> Nope that''s bad advice there are a whole host of systems I've
>> seen where windows is installed in the folder WinNT rather than
>> Windows.

Hmmm... sounds ancient.

>> It's poor practice to hard code variables when there is a way to
>> getthe value dynamically anyway.

Probably, but the client machine uses C:\Windows\System32. So does
100% of
standard XP and Server 2003 installs.

Dec 17 '05 #22
"DFS" <nospam@dfs_.com> wrote in message
news:S1******************@fe04.lga...
From an Access 2003 module: v = Shell("ftp.exe -s:D:\ftpCommands.txt")

Contents of D:\ftpCommands.txt
----------------------------------
open ftp.destination.com
user password
send sourceFile destFile
bye
Results:
ftp> |o
invalid command
Any ideas?


Just to add another idea, why don't MS actually provide a sensible way of
accessing ftp instead of us having to resort to script files? For
reference, there's no ftp class in the 1.1 .Net framwork either.
Dec 17 '05 #23
DFS
Lyle Fairfield wrote:
I will just say I try not to use hard coded paths in production code.
Same here. I rarely, rarely hard code *anything*. Except in minor
instances like this, where the code will only ever run on that one XP
machine with the standard XP installation where it's been tested to work
with C:\Windows\System32.

Now when I say I try, of course, you could find hard coded paths in my
code. (e.g send e-mail with OE). It's because sometimes I'm in a
hurry, sometimes I'm careless and sometimes I've written something as
an example, which other have decided to use in production code,
(arghhhhhhh), like the OE send mail thing.
Sure. Same here.

I also hard code paths for certain systems where I require an .mdb to be
present - because that's where I decided to install it.
Does this mean that I am a liar?
Are you? Are you claiming, like Terry Kreft, that using hard-coded paths
makes me lazy, but you also do it?

I hope not. I hope it just reflects something like Joe Friday's quote:
(probably munged) "We recruit form the human race".


Dec 17 '05 #24
I don't think so.
Did you read the
"We recruit from the human race"
part?

Actually I think Terry said creating inflexible code allows you to be
lazy. Now whether "you" meant you, DFS, or you, as in the person
creating the code I don't know. And being allowed to be lazy does not
mean that one is lazy.

I'll shut up now as Terry is quite capable of speaking for himself.

Dec 17 '05 #25
Wrong.

Wrong again.

I will admit to one thing and that's not having some magical ability to read
your code or know what you've written in the past. Your assertion that you
are 100% certain that you know my code just seems to point to an overweaning
arogance, well I hope that's all it is anyway.
--
Terry Kreft

"DFS" <nospam@dfs_.com> wrote in message
news:_p*****************@fe02.lga...
Terry Kreft wrote:
I have clients using Win98 and I cerainly have clients using WinNT.

Hard coding paths
Never in production work, concept and testing maybe it depends on how
trivial it is.

Accusing me of lying though, pretty much sums up your attitude
I'm 100% sure you have some hard-coded paths or
values out there in your code somewhere,

<SNIP <SNIP> But the fact is, you can't live up to your own standards.


"DFS" <nospam@dfs_.com> wrote in message
news:tL*******************@fe04.lga...
Terry Kreft wrote:
In the business world operating systems do not tend to get upgraded
until the decision to do so is forced.

You have clients still running NT on the desktop?
I spend a lot of time considering how to make my code generic and
flexible simply because there are a lot of systems out there which
are not standard installs, also there is nothing more likely to
generate contempt from professional developers than to find a system
with hardcoded paths in it.

If you want to create inflexible code then that's entirely up to
you, but please don't pretend that there is any value to doing this
except that it allows you to be lazy.

If you're telling me you have no hard-coded paths in any of your
code, I'd
say... you're a liar.

Get over yourself.

"DFS" <nospam@dfs_.com> wrote in message
news:C9*****************@fe03.lga...
> Tom van Stiphout wrote:
>> On Fri, 16 Dec 2005 01:31:49 -0000, "Terry Kreft"
>> <te*********@mps.co.uk> wrote:
>>
>> But it's somewhat reasonable to assume ftp.exe is installed in the
>> system32 folder, which by default is in the path. Actually the use
>> of ComSpec assumes that as well. So one might write:
>> Shell "ftp.exe -s:D:\upload.txt"
>
>
> That doesn't work - at least on my WinServer system. That's what
> prompted my initial post.
>
> I had to specify C:\Windows\System32\ftp, and it runs fine.
>
>
>
>>
>> -Tom.
>>
>>
>>> Nope that''s bad advice there are a whole host of systems I've
>>> seen where windows is installed in the folder WinNT rather than
>>> Windows.
>
> Hmmm... sounds ancient.
>
>
>
>>> It's poor practice to hard code variables when there is a way to
>>> getthe value dynamically anyway.
>
> Probably, but the client machine uses C:\Windows\System32. So does
> 100% of
> standard XP and Server 2003 installs.


Dec 17 '05 #26
On Sat, 17 Dec 2005 22:44:04 -0000, "Rob Oldfield" <bl**@blah.com>
wrote:

Your wish is my command. See the FtpWebRequest and FtpWebResponse
classes in the framework v2.
Signed: BillG.

"DFS" <nospam@dfs_.com> wrote in message
news:S1******************@fe04.lga...
From an Access 2003 module: v = Shell("ftp.exe -s:D:\ftpCommands.txt")

Contents of D:\ftpCommands.txt
----------------------------------
open ftp.destination.com
user password
send sourceFile destFile
bye
Results:
ftp> |o
invalid command
Any ideas?


Just to add another idea, why don't MS actually provide a sensible way of
accessing ftp instead of us having to resort to script files? For
reference, there's no ftp class in the 1.1 .Net framwork either.


Dec 18 '05 #27
DFS
Terry Kreft wrote:
Wrong.

Wrong again.

I will admit to one thing and that's not having some magical ability
to read your code or know what you've written in the past. Your
assertion that you are 100% certain that you know my code just seems
to point to an overweaning arogance, well I hope that's all it is
anyway.
Not arrogance. It's just common knowledge that somewhere you've hard-coded
a path to a file or an .mdb. It's no crime. But hypocrisy and calling
someone lazy for doing what you yourself do is.

The routine in which I now hard-code "C:\Windows\System32\ftp -s..." has at
least 10 statements where I employ a user-defined path, such as:

AppDir = DLookup("LogLocal", "TBL_SETTINGS")
NetDir = DLookup("LogServer", "TBL_SETTINGS")
Open (AppDir & syncFileName) For Output As exportFile
FileCopy (AppDir & syncFileName), (NetDir & syncFileName)
If (FileLen(AppDir & syncFileName) = 0 ...

But near the end it has two hardcoded paths which the users don't and can't
change:

Open "D:\upload.txt" For Output As #1
Shell "C:\WINDOWS\System32\ftp -s:D:\upload.txt"

I hope you haven't billed your clients all that time you've wasted making
your systems unnecessarily "generic and flexible". Imagine if Microsoft
tried to do something similar by letting the user choose where every .dll is
installed. They would never get a product out the door.

And how about that "unprofessional, inflexible, lazy" Registry and all those
hard-coded hives and keys that the OS and most Windows programs use?

And that pesky tnsnames file Oracle requires in the <Oracle
home>\network\admin folder? Why can't I just move it to my desktop?

Are the MS and Oracle people amateur developers like you accused me of
being?

Like I said, get over yourself.




"DFS" <nospam@dfs_.com> wrote in message
news:_p*****************@fe02.lga...
Terry Kreft wrote:
I have clients using Win98 and I cerainly have clients using WinNT.

Hard coding paths
Never in production work, concept and testing maybe it depends on
how trivial it is.

Accusing me of lying though, pretty much sums up your attitude


I'm 100% sure you have some hard-coded paths or
values out there in your code somewhere,

<SNIP

<SNIP>
But the fact is, you can't live up to your own standards.


"DFS" <nospam@dfs_.com> wrote in message
news:tL*******************@fe04.lga...
Terry Kreft wrote:
> In the business world operating systems do not tend to get
> upgraded until the decision to do so is forced.

You have clients still running NT on the desktop?
> I spend a lot of time considering how to make my code generic and
> flexible simply because there are a lot of systems out there which
> are not standard installs, also there is nothing more likely to
> generate contempt from professional developers than to find a
> system with hardcoded paths in it.
>
> If you want to create inflexible code then that's entirely up to
> you, but please don't pretend that there is any value to doing
> this except that it allows you to be lazy.

If you're telling me you have no hard-coded paths in any of your
code, I'd
say... you're a liar.

Get over yourself.

> "DFS" <nospam@dfs_.com> wrote in message
> news:C9*****************@fe03.lga...
>> Tom van Stiphout wrote:
>>> On Fri, 16 Dec 2005 01:31:49 -0000, "Terry Kreft"
>>> <te*********@mps.co.uk> wrote:
>>>
>>> But it's somewhat reasonable to assume ftp.exe is installed in
>>> the system32 folder, which by default is in the path. Actually
>>> the use of ComSpec assumes that as well. So one might write:
>>> Shell "ftp.exe -s:D:\upload.txt"
>>
>>
>> That doesn't work - at least on my WinServer system. That's what
>> prompted my initial post.
>>
>> I had to specify C:\Windows\System32\ftp, and it runs fine.
>>
>>
>>
>>>
>>> -Tom.
>>>
>>>
>>>> Nope that''s bad advice there are a whole host of systems I've
>>>> seen where windows is installed in the folder WinNT rather than
>>>> Windows.
>>
>> Hmmm... sounds ancient.
>>
>>
>>
>>>> It's poor practice to hard code variables when there is a way
>>>> to getthe value dynamically anyway.
>>
>> Probably, but the client machine uses C:\Windows\System32. So
>> does 100% of
>> standard XP and Server 2003 installs.

Dec 19 '05 #28

You obviously have no idea what is meant by hardcoding, how OLE dlls work,
the purpose of the registry or indeed much idea of professional programming.

I evidently have nothing to learn from you and you are evidently unwilling
to learn from anyone else, so I think I'll leave your megalomanic
self-perceived omniprescience where it belongs; flapping in the ether.

<PLONK>

BTW, for any lurkers;
OLE compliant dlls can be installed anywhere; when they are registered
an entry in the registry points to the correct file.
Non-OLE compliant dlls can usually be installed anywhere in the
application folder, the path or the system folder.
Registry entries are changeable by users and therefore are not
hardcoded.
I don't know about you but I'm certainly not responsible for the
incompetence of the programmers at Oracle.

--
Terry Kreft

"DFS" <nospam@dfs_.com> wrote in message
news:mP*******************@fe07.lga...
Terry Kreft wrote:
Wrong.

Wrong again.

I will admit to one thing and that's not having some magical ability
to read your code or know what you've written in the past. Your
assertion that you are 100% certain that you know my code just seems
to point to an overweaning arogance, well I hope that's all it is
anyway.


Not arrogance. It's just common knowledge that somewhere you've
hard-coded
a path to a file or an .mdb. It's no crime. But hypocrisy and calling
someone lazy for doing what you yourself do is.

The routine in which I now hard-code "C:\Windows\System32\ftp -s..." has
at
least 10 statements where I employ a user-defined path, such as:

AppDir = DLookup("LogLocal", "TBL_SETTINGS")
NetDir = DLookup("LogServer", "TBL_SETTINGS")
Open (AppDir & syncFileName) For Output As exportFile
FileCopy (AppDir & syncFileName), (NetDir & syncFileName)
If (FileLen(AppDir & syncFileName) = 0 ...

But near the end it has two hardcoded paths which the users don't and
can't
change:

Open "D:\upload.txt" For Output As #1
Shell "C:\WINDOWS\System32\ftp -s:D:\upload.txt"

I hope you haven't billed your clients all that time you've wasted making
your systems unnecessarily "generic and flexible". Imagine if Microsoft
tried to do something similar by letting the user choose where every .dll
is
installed. They would never get a product out the door.

And how about that "unprofessional, inflexible, lazy" Registry and all
those
hard-coded hives and keys that the OS and most Windows programs use?

And that pesky tnsnames file Oracle requires in the <Oracle
home>\network\admin folder? Why can't I just move it to my desktop?

Are the MS and Oracle people amateur developers like you accused me of
being?

Like I said, get over yourself.




"DFS" <nospam@dfs_.com> wrote in message
news:_p*****************@fe02.lga...
Terry Kreft wrote:
I have clients using Win98 and I cerainly have clients using WinNT.

Hard coding paths
Never in production work, concept and testing maybe it depends on
how trivial it is.

Accusing me of lying though, pretty much sums up your attitude

I'm 100% sure you have some hard-coded paths or
values out there in your code somewhere,

<SNIP

<SNIP>
But the fact is, you can't live up to your own standards.

"DFS" <nospam@dfs_.com> wrote in message
news:tL*******************@fe04.lga...
> Terry Kreft wrote:
>> In the business world operating systems do not tend to get
>> upgraded until the decision to do so is forced.
>
> You have clients still running NT on the desktop?
>
>
>> I spend a lot of time considering how to make my code generic and
>> flexible simply because there are a lot of systems out there which
>> are not standard installs, also there is nothing more likely to
>> generate contempt from professional developers than to find a
>> system with hardcoded paths in it.
>>
>> If you want to create inflexible code then that's entirely up to
>> you, but please don't pretend that there is any value to doing
>> this except that it allows you to be lazy.
>
> If you're telling me you have no hard-coded paths in any of your
> code, I'd
> say... you're a liar.
>
> Get over yourself.
>
>
>
>
>
>> "DFS" <nospam@dfs_.com> wrote in message
>> news:C9*****************@fe03.lga...
>>> Tom van Stiphout wrote:
>>>> On Fri, 16 Dec 2005 01:31:49 -0000, "Terry Kreft"
>>>> <te*********@mps.co.uk> wrote:
>>>>
>>>> But it's somewhat reasonable to assume ftp.exe is installed in
>>>> the system32 folder, which by default is in the path. Actually
>>>> the use of ComSpec assumes that as well. So one might write:
>>>> Shell "ftp.exe -s:D:\upload.txt"
>>>
>>>
>>> That doesn't work - at least on my WinServer system. That's what
>>> prompted my initial post.
>>>
>>> I had to specify C:\Windows\System32\ftp, and it runs fine.
>>>
>>>
>>>
>>>>
>>>> -Tom.
>>>>
>>>>
>>>>> Nope that''s bad advice there are a whole host of systems I've
>>>>> seen where windows is installed in the folder WinNT rather than
>>>>> Windows.
>>>
>>> Hmmm... sounds ancient.
>>>
>>>
>>>
>>>>> It's poor practice to hard code variables when there is a way
>>>>> to getthe value dynamically anyway.
>>>
>>> Probably, but the client machine uses C:\Windows\System32. So
>>> does 100% of
>>> standard XP and Server 2003 installs.


Dec 19 '05 #29
DFS
Terry Kreft wrote:
You obviously have no idea what is meant by hardcoding, how OLE dlls
work, the purpose of the registry or indeed much idea of professional
programming.
I take it you found some hard-coded paths in your code, and have decided to
take your ball home from the playground. Good. That's known as getting
over yourself.
I evidently have nothing to learn from you and you are evidently
unwilling to learn from anyone else, so I think I'll leave your
megalomanic self-perceived omniprescience where it belongs; flapping
in the ether.

<PLONK>
Smart move.
BTW, for any lurkers;
OLE compliant dlls can be installed anywhere; when they are
registered an entry in the registry points to the correct file.
Now tell me how I can install them to different places but retain a
functional system. What's that? I can't, because the programs expect them
to be in certain, hard-coded locations? But that's "poor practice,
amateurish, unprofessional, etc etc."?
Non-OLE compliant dlls can usually be installed anywhere in the
application folder, the path or the system folder.
I want to put them somewhere else. You say it's unprofessional to hard-code
any file locations/paths. But I'd say 99% of programs in use look for fixed
file locations. So, either you're wrong or everyone else is.

I put my money on you being wrong.
Registry entries are changeable by users and therefore are not
hardcoded.
The locations of the keys are hard-coded within the hive, and most Windows
programs write keys to fixed locations, ala HKEY_LOCAL_MACHINE\SOFTWARE\.

Now what kind of incompetent, inflexible, amateur, unprofessional developer
at MS designed that?

He obviously never spoke to cdma weenie Terry Kreft.
I don't know about you but I'm certainly not responsible for the
No, you're just responsible for your own delusions about being
"professional" while everyone else is an "amateur" who follows poor
programming practices.
incompetence of the programmers at Oracle.
LOL!


"DFS" <nospam@dfs_.com> wrote in message
news:mP*******************@fe07.lga...
Terry Kreft wrote:
Wrong.

Wrong again.

I will admit to one thing and that's not having some magical ability
to read your code or know what you've written in the past. Your
assertion that you are 100% certain that you know my code just seems
to point to an overweaning arogance, well I hope that's all it is
anyway.


Not arrogance. It's just common knowledge that somewhere you've
hard-coded
a path to a file or an .mdb. It's no crime. But hypocrisy and
calling someone lazy for doing what you yourself do is.

The routine in which I now hard-code "C:\Windows\System32\ftp -s..."
has at
least 10 statements where I employ a user-defined path, such as:

AppDir = DLookup("LogLocal", "TBL_SETTINGS")
NetDir = DLookup("LogServer", "TBL_SETTINGS")
Open (AppDir & syncFileName) For Output As exportFile
FileCopy (AppDir & syncFileName), (NetDir & syncFileName)
If (FileLen(AppDir & syncFileName) = 0 ...

But near the end it has two hardcoded paths which the users don't and
can't
change:

Open "D:\upload.txt" For Output As #1
Shell "C:\WINDOWS\System32\ftp -s:D:\upload.txt"

I hope you haven't billed your clients all that time you've wasted
making your systems unnecessarily "generic and flexible". Imagine
if Microsoft tried to do something similar by letting the user
choose where every .dll is
installed. They would never get a product out the door.

And how about that "unprofessional, inflexible, lazy" Registry and
all those
hard-coded hives and keys that the OS and most Windows programs use?

And that pesky tnsnames file Oracle requires in the <Oracle
home>\network\admin folder? Why can't I just move it to my desktop?

Are the MS and Oracle people amateur developers like you accused me
of being?

Like I said, get over yourself.




"DFS" <nospam@dfs_.com> wrote in message
news:_p*****************@fe02.lga...
Terry Kreft wrote:
> I have clients using Win98 and I cerainly have clients using
> WinNT.
>
> Hard coding paths
> Never in production work, concept and testing maybe it depends on
> how trivial it is.
>
> Accusing me of lying though, pretty much sums up your attitude

I'm 100% sure you have some hard-coded paths or
values out there in your code somewhere,
<SNIP

<SNIP>
But the fact is, you can't live up to your own standards.

> "DFS" <nospam@dfs_.com> wrote in message
> news:tL*******************@fe04.lga...
>> Terry Kreft wrote:
>>> In the business world operating systems do not tend to get
>>> upgraded until the decision to do so is forced.
>>
>> You have clients still running NT on the desktop?
>>
>>
>>> I spend a lot of time considering how to make my code generic
>>> and flexible simply because there are a lot of systems out
>>> there which are not standard installs, also there is nothing
>>> more likely to generate contempt from professional developers
>>> than to find a system with hardcoded paths in it.
>>>
>>> If you want to create inflexible code then that's entirely up to
>>> you, but please don't pretend that there is any value to doing
>>> this except that it allows you to be lazy.
>>
>> If you're telling me you have no hard-coded paths in any of your
>> code, I'd
>> say... you're a liar.
>>
>> Get over yourself.
>>
>>
>>
>>
>>
>>> "DFS" <nospam@dfs_.com> wrote in message
>>> news:C9*****************@fe03.lga...
>>>> Tom van Stiphout wrote:
>>>>> On Fri, 16 Dec 2005 01:31:49 -0000, "Terry Kreft"
>>>>> <te*********@mps.co.uk> wrote:
>>>>>
>>>>> But it's somewhat reasonable to assume ftp.exe is installed in
>>>>> the system32 folder, which by default is in the path. Actually
>>>>> the use of ComSpec assumes that as well. So one might write:
>>>>> Shell "ftp.exe -s:D:\upload.txt"
>>>>
>>>>
>>>> That doesn't work - at least on my WinServer system. That's
>>>> what prompted my initial post.
>>>>
>>>> I had to specify C:\Windows\System32\ftp, and it runs fine.
>>>>
>>>>
>>>>
>>>>>
>>>>> -Tom.
>>>>>
>>>>>
>>>>>> Nope that''s bad advice there are a whole host of systems
>>>>>> I've seen where windows is installed in the folder WinNT
>>>>>> rather than Windows.
>>>>
>>>> Hmmm... sounds ancient.
>>>>
>>>>
>>>>
>>>>>> It's poor practice to hard code variables when there is a way
>>>>>> to getthe value dynamically anyway.
>>>>
>>>> Probably, but the client machine uses C:\Windows\System32. So
>>>> does 100% of
>>>> standard XP and Server 2003 installs.


Dec 19 '05 #30

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

Similar topics

10
by: John Phelan | last post by:
I read an article by, by Mike Groh, in Access-VB-SQL Advisor Magazine, Week 37 that concerns me quite a bit on distributing Access Applications commercially. First I need to describe a "commercial...
5
by: Praty77 | last post by:
Hello - we have been using access 97 for a multiple user trading system at a small bank. Typically around 10 users entered a total of hundred trades everyday. Some of the data was shared with a...
0
by: Frederick Noronha \(FN\) | last post by:
---------- Forwarded message ---------- Solutions to Everyday User Interface and Programming Problems O'Reilly Releases "Access Cookbook, Second Edition" Sebastopol, CA--Neither reference book...
0
by: Steve | last post by:
Greetings, I'm having problems with the use of an Access 2003 Add-In on Windows XP Pro. Administrative-level users have no problems running the Add-In, but those users with restricted rights on...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
2
by: Jeff | last post by:
Does anyone know of any potential problems running a 2000 database with 2003? Also, what about installing all other Office products as 2003 versions but leaving Access as 2002 running a 2000...
10
by: B Moor | last post by:
Host PC: Win SBS 2003 with 2.6 GHz processor and 1GB RAM SQL Server 2000 sp3 (or latest).MS Office 2k3 I have the access 2k3 front end running on server (this may get changed) and all was well...
56
by: Raphi | last post by:
Hi, I've been using an Access application I wrote for an office with the front-end stored on all computers and the back-end on one of them serving as an Access file server. Now we're moving...
62
by: Ecohouse | last post by:
I was just wondering if there was any way to use a toolbar in Outlook 2002 in Access 2002? I want to create a custom toolbar in Access similar to the Calendar toolbar in Outlook. Any ideas?
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.