Page 1 of 1 1
Topic Options
#22495 - 2002-05-31 09:03 PM use of the macro @WKSTA
Edy Offline
Fresh Scripter

Registered: 2002-05-31
Posts: 11
Loc: Switzerland
Dear all,

I want to copy txt files from a particular directory on the local workstation to a server. But the txt file name should change to the computer name. I thought using the @WKSTA macro does the job.

This is the KIX line

COPY ("C:\LOCALDIR\Subfolder\*.TXT" "\\SERVER\DIR\@WKSTA.TXT")

What do I wrong

Thank you
Edy

Top
#22496 - 2002-05-31 09:13 PM Re: use of the macro @WKSTA
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Is there more than one file on the client that can be picked up with the *.txt? Your "TO" UNC does not list a share name after the server. Only guessing here. Use the @error and @Serror macros to determine the actual error encountered so that you can make the proper corrections.

COPY ("C:\LOCALDIR\Subfolder\*.TXT" "\\SERVER\DIR\@WKSTA.TXT")

? "Copy: @error @serror"
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#22497 - 2002-05-31 09:38 PM Re: use of the macro @WKSTA
Edy Offline
Fresh Scripter

Registered: 2002-05-31
Posts: 11
Loc: Switzerland
Thank you for your reply.

There are about 5 txt file on the local dir and yes on the server is a share. I just didn't type it.

Regards
Edy

Top
#22498 - 2002-05-31 09:41 PM Re: use of the macro @WKSTA
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Guys,
The manual says that COPY is a command, not a function. What's with the brackets? Try without.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#22499 - 2002-05-31 09:48 PM Re: use of the macro @WKSTA
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
There I go again missing the really obvious stuff. And someone even mention that I might make a good moderator. [Embarrassed]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 696 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.053 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org