Page 1 of 1 1
Topic Options
#153020 - 2005-12-07 11:30 AM How to rename a file with "@FullName"
Fredrik777 Offline
Fresh Scripter

Registered: 2003-09-02
Posts: 7
Loc: Germany
Hello,

I hope someone will understand my problem (sorry for my bad English) and can help me:

I have a working Script, this Script generates a .ini file wich contains information about the User and the Computer.
The File name ist generated by kix successfully. For Example "administrator at PC01.ini"

Now, I want to rename this File in "@FullName".ini (@FullName is a Kix var.)

My (not working) Synatx is:

kix32.exe MOVE "%username% at %computername%.ini" @FullName + ".ini"

Any Ideas??

Thanks,
Fredrik

Top
#153021 - 2005-12-07 11:38 AM Re: How to rename a file with "@FullName"
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
kixtart does not take script from it's standard input nor commandline.
you need to add this line to a script or make a script file for it.
say move.kix

and then use:
kix32 move

as the commandline.
_________________________
!

download KiXnet

Top
#153022 - 2005-12-07 11:38 AM Re: How to rename a file with "@FullName"
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Please try this.

Code:

MOVE @USERID + " at " + @WKSTA + ".ini" @FULLNAME + ".ini"



This:

Code:

kix32.exe MOVE "%username% at %computername%.ini" @FullName + ".ini"


is not proper syntax. kix32.exe somescript.kix is the proper way to run kixscripts.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#153023 - 2005-12-07 12:39 PM Re: How to rename a file with "@FullName"
Fredrik777 Offline
Fresh Scripter

Registered: 2003-09-02
Posts: 7
Loc: Germany
Hallo,

thanks for your information, but I get the message:
ERROR: failed to find/open script!

The Syntax ist exaclty:
kix32.exe MOVE @USERID + " at " + @WKSTA + ".ini" @FULLNAME + ".ini"

!The File "Administrator at PC01.ini" definitly exists in C:\!

"Administrator" is my Windows User name (so it should be my "@USERID").
"PC01" is my Windows Computername (so it should be "@WKSTA").

I tried (additionally):
kix32.exe MOVE "C:\" + @USERID + " at " + @WKSTA + ".ini" "C:\" + @FULLNAME + ".ini"

No better result! Any Idea?

Top
#153024 - 2005-12-07 12:55 PM Re: How to rename a file with "@FullName"
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Ok. Like said you use the wrong syntax.

Just copy the move line posted above into notepad and save the file in c: as move.kix.
After saving run kix32 c:\move.kix from a command windows and you'll be surprised.

All is explained in the manual included in each KiXtart download.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#153025 - 2005-12-07 02:53 PM Re: How to rename a file with "@FullName"
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
huh.
it was explained twice.
YOU CAN'T SCRIPT THE COMMAND LINE.

you need to have a script file.
now, stop a moment and re-read my uppercase line.
and read it so many time that it starts to sink in.
_________________________
!

download KiXnet

Top
#153026 - 2005-12-07 04:09 PM Re: How to rename a file with "@FullName"
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Like ppl here keep telling ya, you need to create a file and put your code in it. then point kix to the file.
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

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 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.105 seconds in which 0.076 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