Page 1 of 1 1
Topic Options
#121756 - 2004-06-23 08:03 PM Wildcards when using "Move"
Nathana Offline

Registered: 2004-06-23
Posts: 2
Every day I need to 'move' a file that has a different name each day but always starts with atm. I'm having a hard time using the wildcard in the move command. One day the file will be atm3152 and the next day it might be atm5487.
I would appreciate any ideas...the whole thing works if i put the entire file name in.

MOVE "C:\test\atm*.* " "C:\test\test"

$File = "C:\test\test"
$DLine = ' '
$Rline = '12'
$TempFile = + ".TMP"
$LineNum = 0

$Rcode = OPEN (1, $File, 2)
DEL $TempFile
$Rcode = OPEN (2, $TempFile, 5)

$Line = READLINE(1)
WHILE @Error = 0

$LineNum = $LineNum + 1
IF $Line = $DLine
$Rcode = WRITELINE(2, $RLine + Chr(13) + Chr(10))
$Rcode = WRITELINE(2, $Line + Chr(13) + Chr(10))
$Line = READLINE(1)
$Rcode = CLOSE(1)
$Rcode = CLOSE(2)
COPY $TempFile $File
DEL $TempFile

#121757 - 2004-06-23 08:15 PM Re: Wildcards when using "Move"
Les Offline
KiX Master

Registered: 2001-06-11
Posts: 12734
MOVE "C:\test\atm*.* " "C:\test\test"

works for me on XP with KiX 4.22

Not sure why you have a trailing space after *.*
You sould put a trailing hack on the folder name though.
MOVE "C:\test\atm*.*" "C:\test\test\"

What @ProductType and @KiX ?

Edited by Les (2004-06-23 08:17 PM)
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

#121758 - 2004-06-23 09:07 PM Re: Wildcards when using "Move"
Nathana Offline

Registered: 2004-06-23
Posts: 2
Sweet, You helped me alot. I was unfamiliar with the MOVE command. I was also trying to use it to rename.


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 318 anonymous users online.
Newest Members
Kelly001, MichaelK72, Janneman, standardbruker, maikoenig2001
17773 Registered Users

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

Search the board with:
superb Board Search
or try with google: