[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] Unable to Move or Del from CALL SYSTEM...



The program closes all files prior to trying to move them.  Also, 'copy'
works for us; it's 'move' that doesn't work...go figure.

Again, any help would be appreciated.

TIA,

Steven Ross
Applications Developer/Analyst
sross@kcm.org




-----Original Message-----
From: Stephen Ratliff [mailto:stephenratliff@hotmail.com] 
Sent: Wednesday, June 25, 2003 6:08 PM
To: sross@kcm.org
Subject: Re: [sqr-users] Unable to Move or Del from CALL SYSTEM...


Try this. ALSO BE SURE THE FILE(S) YOU ARE MOVING ARE CLOSED.  I have made 
that mistake many times. You cannot move/delete/rename opened files.

(IMPORTPREFIX is #define'd and referenced to SETENV.sqc for the UNC path for

files)
$File_complete is the filename.  You should be able to put *.* in its place.


let $ofile1 = '{IMPORTPREFIX}' || '\Procard\Archive\'
let $ifile1 = '{IMPORTPREFIX}' || '\Procard\Input\'


let $rcp1 = 'cmd /c copy '
let $copy-command = $rcp1 || $ifile1 || $file_complete || ' ' || $ofile1

CALL SYSTEM using $copy-command #command-status WAIT


Stephen Ratliff

-The problem with democracy is that it counts the number of heads not their 
content.





----Original Message Follows----
From: "Ross, Steven" <sross@kcm.org>
To: "'sqr-users@sqrug.org'" <sqr-users@sqrug.org>
Subject: [sqr-users] Unable to Move or Del from  CALL SYSTEM...
Date: Wed, 25 Jun 2003 16:57:34 -0500

Hello,

We have a process which backs up output files, and another one that moves
output files.  Both use the CALL SYSTEM syntax to perform a system command.
However the 'move' routine fails, while the 'backup' routine succeeds.  I've
worked with our LAN people, and have eliminated Permissions as a cause.

Here are the particulars:

OS: Windows 2000 Server

Backup command:
C:\WINNT\system32\cmd.exe /c xcopy /y
"\\kcmfp1\FDEV\operations\USA\Step2_Out\SPECIAL\*.*"
"\\kcmfp1\FDEV\operations\USA\Step2_Out\SPECIAL\20030625_976690\"


Move command:
C:\WINNT\system32\cmd.exe /c move /y
"\\kcmfp1\FDEV\operations\USA\Step2_Out\SPECIAL\*.*"
"\\kcmfp1\FDEV\operations\USA\Step2_Out\SPECIAL\Completed"

These commands are both called in the same way:
CALL SYSTEM USING $kc_cmd #ReturnValue WAIT

Where $kc_cmd is the command line(s) above.  The #ReturnValue = 1, which
Win2K says is: "Incorrect function."

Any help would be GREATLY appreciated,

Thanks,

Steven Ross
Applications Developer/Analyst
IT Mailings Coordinator
Kenneth Copeland Ministries
sross@kcm.org
817-252-2844


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users