Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Copy Files Within Powerbuilder 6.5

113 views
Skip to first unread message

Darren Cameron

unread,
Oct 17, 2000, 3:00:00 AM10/17/00
to
Roy, we have been using SHFileOperation to copy files using wildcards but
have run into 2 problems with it that possibly you can help with.
1. On WinNT Terminal Server SP4 and SP5, when trying to copy files using the
wild card (*.*) it gives me a Windows error message saying that the file or
path could not be found, but copies the files anyway. Is there any way to
suppress the error message so the file copy executes without user
intervention ?
2. On Win2000 Terminal Server SP1, I get basically the same message but the
file will not copy using wildcards. If I hard code a file name then
SHFileOperation will copy the file but the problem with that is, we need the
flexibility to copy varying files and CopyFile (which does work with Win2K)
is better for hard coded filenames.
We are using PB 6.5.1
Any suggestions ?
Thanks
Darren Cameron
came...@quorumis.com

"Roy Kiesler [TeamSybase]" <SPAM_FREE...@noblestar.com> wrote in
message news:Gc$Ab$eX$GA....@forums.sybase.com...
> The SHFileOperation Win32 API function allows you to
copy/move/rename/delete
> files (including wildcards) with the optional animated progress dialogs
you
> see in Explorer. If you need a code sample, check out
> http://rkiesler.home.mindspring.com/win32api/shellsrv.htm -- note that the
> demo app is PFC-based, but you can easilly de-couple the API calls from
it.
>
> As for the working directory, the GetCurrentDirectoryA Win32 API is what
you
> need -- search back in this forum and you'll find many code samples for
this
> API.
>
> --
> pbm_hopethishelps,
> Roy Kiesler [TeamSybase]
> Sybase Developers Network (SDN) - http:///www.sybase.com/sdn
>
> "Odon Schoofs" <odon.s...@wkb.be> wrote in message
> news:Kw0d8iZX$GA....@forums.sybase.com...
> > I've got to copy a file from within the starting-directory of my
program,
> > called "extract.mdb" to another filename/location.
> >
> > Is there a command/api-call to do it easily?
> >
> >
> > Question2:
> > How can I get the name of the current working(program-startup)
> directory???
> >
> >
> > Thank you for your help!
> > Odon Schoofs
> >
> >
>
>

Roy Kiesler [TeamSybase]

unread,
Oct 17, 2000, 3:00:00 AM10/17/00
to
There is a flag to perform silet file operations -- I can't recall what it
is off the top of my head, but look at the instance variable constant
declarations.

I am not quite sure how CopyFile is better as far as hard-coded filenames
are concerned. Can you explain?

--
pbm_hopethishelps,
Roy Kiesler [TeamSybase]

mySybase - http://my.sybase.com

"Darren Cameron" <came...@quorumis.com> wrote in message
news:3FLbhYH...@forums.sybase.com...

0 new messages