2005 Jul 11 9:48 AM
Hi All,
I tried the following code for Windows NT to move a file from one directory to another but its not working.Can you please suggest what is going wrong
am using operating system command 'MOVE' while creating external command
ws_file_path = 'D:\usr\sap\UKR\DVEBMGS00\work\ENQLOG00.DAT'.
p_tg_dir = 'D:\usr\sap\UKR\DVEBMGS00\data'.
Forming the command
concatenate ws_file_path p_tg_dir into ws_comm_winnt
separated by space.
Call function to execute 'ZMV' command defined in SM69 CALL FUNCTION
call function 'SXPG_COMMAND_EXECUTE'
exporting
commandname = 'ZMV'
additional_parameters = ws_comm_winnt
operatingsystem = sy-opsys
stdout = 'X'
stderr = 'X'
terminationwait = 'X'
importing
status = ws_zstat
exitcode = ws_zexit
tables
exec_protocol = t_move
The funny thing is, if i debug the program, the files are moving correctly... Without debug if i execute the program it's not working....
2005 Jul 11 9:59 AM
2005 Oct 20 8:03 PM
Hi Sunil,
We are facing exactly the same problem at the moment. However, in our case the move works partially, that is, if a list of files needs to be moved from one (shared Windows) directory to another, some of the files are moved, and some remain where they are. Upon debugging however, all files are moved correctly.
Have you found any solution to the problem?
Thanks,
Joë
2010 Sep 29 9:37 AM
Have you checked return table EXEC_PROTOCOL? It usually provides good e.g. unix/nt line-command feedback.