Wildcards in CopyFile or MoveFile

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
sr24271
Newbie
Posts: 1
Joined: Thu Feb 06, 2003 6:02 pm

Wildcards in CopyFile or MoveFile

Post by sr24271 » Thu Feb 06, 2003 6:05 pm

I am unable to get wildcards to work with these commands. Sample script below:

Month>MM
Day>DD
Year>YYYY
Let>CF_OVERWRITE=1
CopyFile>D:\Laserapps\Spool\Xactimed\EXPORTPOSTUB92*.*,D:\LASERAPPS\SPOOL\XACTIMED\BACKUP\UB92%YYYY%%MM%%DD%.TXT
rem>MoveFile>d:\laserapps\spool\xactimed\EXPORTPOSTUB92*,D:\LASERAPPS\SPOOL\UB92X\UB92X.TXT

I can only make this work if I code the exact filenames.

Any thoughts?

Lumumba

Post by Lumumba » Thu Feb 06, 2003 6:58 pm

Replace the Macro Scheduler command with it's DOS equivalent:

Code: Select all

Run Program> cmd /c Copy D:\Laserapps\Spool\Xactimed\EXPORTPOSTUB92*.* D:\LASERAPPS\SPOOL\XACTIMED\BACKUP\UB92%YYYY%%MM%%DD%.TXT

Run Program> cmd /c Move D:\laserapps\spool\xactimed\EXPORTPOSTUB92* D:\LASERAPPS\SPOOL\UB92X\UB92X.TXT
cmd = WinNT/W2K/XP
command = Win9x/Me

cmd /k /?

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Feb 06, 2003 9:31 pm

Hi,

You can't move multiple files to a single file. If you want to move files, remove the filename from the target destination.
MJT Net Support
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts