‎2005 Mar 01 11:07 AM
Hi,
I have written a batch program which copies files from SAP Application Server(4.6B) to external machine in LAN. This machine is mapped on SAP App Server. The contents of this file are:-
@ECHO OFF
FOR /f "delims=" %%a in ('date /t') do set DATE=%%a
SET CUR-DATE=%DATE:~4,10%
XCOPY H:\source
ust-ght3dxp0097\fullc /D:%CUR-DATE%
XCOPY H:\source Z:\ /D:%CUR-DATE%
where ust-ght3dxp0097 is the external machine and Z is the mapped drive on SAP App server.
Now this batch file works fine when executed from commandline. I want to execute this from my ABAP program.
Hence I created an external command from SM69 as follows:
Operating system command
C:\CopyFilesCreatedToday.bat
This batch file is place in C drive of SAP Application Server.
When I try to execute this external command from SM49 it gives the following error.
Invalid Drive Specification
0 files copied
Invalid Drive Specification
0 files copied
Can somebody help me with this error.
‎2005 Mar 01 11:14 AM
Hi,
are you sure that you are on the correct application server? If you have more than one app-server running, this might be the error.
regards
Siggi
‎2005 Mar 01 11:15 AM
Hi Stephen,
It's little hard to read your code, but I see a lot of time the same error in shell script : do you check there is no space in your file / directory name ?
Frédéric
‎2005 Mar 01 11:21 AM
Hi Frederic/Siggi,
There is no space in between file / directory name.
And also there is only one Applicaion server running.
Stephen
‎2005 Mar 01 12:21 PM
Do you try to do an echo ?
Don't know Microsoft Shell, but in Unix shell that display the content of a data.
Frédéric
‎2005 Mar 01 1:37 PM
Hi,
if echo is not possible, you can try to output variables from your batch file to some output/file in order to check if they kept the values you expect, or even more, to check the existence of the files in your directories - calling dir <myDirectoryVariavle> or similar depending on your os. I've similar problems in the past - not with SAP appl. server, but with MS SQL server and execution of the batch-files via stored procedures - in some Windows (w2k, xp, 2003).
HTH
Ivaylo
‎2005 Mar 01 9:28 PM
Are you sure your 'H' and 'D' drives are also accessable from SAP server?
Srinivas
‎2005 Mar 02 6:19 AM
Hi Srivivas,
"H:\Source" is on SAP server from where it is copied to
"
ust-ght3dxp0097\fullc".
The Drive "Z" is the mapped drive on SAP server of "
ust-ght3dxp0097\fullc".
‎2005 Nov 14 1:47 PM
Hi Peter,
The critical point maybe is this:
"Operating system command
C:\CopyFilesCreatedToday.bat"
Dont't use the local drive C:! Use a network-drive instead.
BR
Michael
‎2005 Nov 14 1:53 PM
> Hi Peter,
>
> The critical point maybe is this:
>
> "Operating system command
> C:\CopyFilesCreatedToday.bat"
>
> Dont't use the local drive C:! Use a network-drive
> instead.
>
> BR
> Michael
Hi Michael,
Are you family of Jack Bauer? Just kidding sorry for the inconvenience
Stephan