Page 2 of 2 <12
Topic Options
#94601 - 2002-10-31 09:09 AM Re: Best options/best way?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I must apologize for not working on this until now. No excuses.

As soon as we get these bits of code finalized, we should then be able to update the FAQ.

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#94602 - 2002-11-01 05:02 AM Re: Best options/best way?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
bxn,

You out there?

[Big Grin] [Big Grin] [Big Grin]

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#94603 - 2002-11-25 06:00 PM Re: Best options/best way?
Bxn Offline
Getting the hang of it

Registered: 2002-06-05
Posts: 63
Loc: Alpha Centauri
Kent,
Yes, I'm Back Again ... but [sadly] only for a few moments.
I've had to work in some very remote places and did'nt have the opportunity to check the board.
Second thing which prevented me to be 'present' :
The recent birth of my second son Warren [Smile] !
Without URL to point to, I won't be able to put any picture of him [Frown]

I'm glad [and ... proud] you took of your time to consider my remarks and hope to have soon more time to really be back again.

Cheers,

Top
#94604 - 2002-11-25 08:51 PM Re: Best options/best way?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
bxn,

Congratulations! You must be a proud poppa!

No hurry on the comments/follow-up on this.

I was glad to have somebody point out short/pitfalls encountered with these file ops.

As you may have noticed with the tile of this thread - "Best options/best way?" That I was soliciting from the user community any all feedback.

So, my hat is off to you.

Thanks again and take care of your newest member of your family.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#94605 - 2002-11-25 08:59 PM Re: Best options/best way?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
So would that be a microchip off the old block structure? [Big Grin]

Congratulations!
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#94606 - 2003-08-07 02:42 PM Re: Best options/best way?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
With the new MOVE, here is the new version of this script -

code:
 ;Test environment: Windows XP
;Kix Version: 4.21+
;Kent Dyer
;07-August-2003
;version .81
;Test: Create a simple text file called ScripTest and insert some text in it
;Findings: a file name and folder name of the same name cannot exist on the same volume
; also works with a zero-byte file too.
;Thanks: to bxn from http://kixtart.org for pointing out the error 183 when a file exists with
;same name as the folder
;using Kixtart commands
BREAK ON
CLS
;Trying To Create A Folder as Necessary
$foldernametocheck = "C:\ScriptTest"
$lenfolder = Len($foldernametocheck)
$foldername = substr($foldernametocheck,4,$lenfolder)
$drv=Left($foldernametocheck,3)

; - First check to see if this is a file
IF EXIST($foldernametocheck) AND NOT (GETFILEATTR($foldernametocheck) & 16)
? $foldernametocheck + " appears to exist as a file"
?'Press Y and <ENTER> to continue and rename the file and create the folder'
?'Press N and <ENTER> to exit'
?'>'
GETS $k
IF $k = 'Y'
IF @KIX<'4.21'
SHELL '%comspec% /c ren ' + $foldernametocheck + ' ' + $foldername + 1
ELSE
;MOVE $foldernametocheck $foldername + '1' ; This deletes the file,
;you need to define the drive letter
MOVE $foldernametocheck $drv+$foldername+'1'
ENDIF
?'Creating '+ $foldernametocheck + ' now'
MD $foldernametocheck
IF @error <> 0
?@error
SLEEP 2
ENDIF
ELSE
RETURN
ENDIF
ENDIF
IF EXIST($foldernametocheck) AND (GETFILEATTR($foldernametocheck) & 16)
?$foldernametocheck + ' Appears to exist as a folder.'
SLEEP 2
RETURN
ELSE
?'Creating ' + $foldernametocheck + ' now'
MD $foldernametocheck
IF @error <> 0
?@error
SLEEP 2
ENDIF
ENDIF
? 'File/folder checks complete'
? 'Press any Key to exit'
GET $l

Kent

[ 07. August 2003, 14:43: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 2 of 2 <12


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

Who's Online
0 registered and 239 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

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

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