cancel
Showing results for 
Search instead for 
Did you mean: 

How to move file from share folder to windows drive folder using ""command before processing

former_member213558
Active Participant
0 Kudos

Dear All.

scenario is: file to SFTP.

source file directory is an network share folder, we need to pick it from share folder using File adapter using NFS protocol.

when i maintain my share folder path in file adapter getting an exception like ""directory does not exist".

please note: customer is not allowing to use FTP tool to install in an application sever.

and finally we decided to move the file from share folder to windows drive folder by using "Run operation system command before message processing " option.so some bat file need to maintain in an OS level.

so we used below content in bat file

@echo off 
Copy "S:\New folder\*.*" "C:\New folder\" 
@echo off
Move "S:\New folder\*.*" "S:New folder\Archive\" 
exit

but when start the channel getting an exception like, " Error executing OS command "E:\folder\move.bat" "

but when i execute the dat file separately it's moving a file from share folder to window drive folder.

please suggest .

Accepted Solutions (0)

Answers (2)

Answers (2)

manoj_khavatkopp
Active Contributor
0 Kudos

No sorry , i dont have any scripts as of now.

Lets say your share drive path is Z:/folder/inp and the PI folder is /usr/sap/test/myfolder so these two folder will be mounted and now in channel you need to access the folder /usr/sap/test/myfolder and not the share-drive folder.

To check if your mount is working correctly or not place a test file in Z:/folder/inp and the same file has to get reflected in /usr/sap/test/myfolder which confirms the mount.

br,

Manoj

manoj_khavatkopp
Active Contributor
0 Kudos

Ramesh,

The S drive is your Netwook drive and you have placed script in your PI OS E drive , script is searching for S drive in OS level .

AFAIK you cant run the script on source server directly first write a script which connects your Network drive and then calls a script places in network drive to move the file.

But alternatively instead of using scripts , why dont you just mount the network shard drive folder to one of your PI folder then use the file-NFS and pick the file.

but when i execute the dat file separately it's moving a file from share folder to window drive folder.

I guess you are running this driecetly from your local desktop and not from PI OS , right ?

Br,

Manoj

former_member213558
Active Participant
0 Kudos

Dear Manoj.

thank you for your reply.

AFAIK you cant run the script on source server directly first write a script which connects your Network drive and then calls a script places in network drive to move the file.

we are planning to do as you suggested, do you have any sample script.

But alternatively instead of using scripts , why dont you just mount the network shard drive folder to one of your PI folder then use the file-NFS and pick the file.

yes, we tried, even the share folder (Z:/folder/inp)mounted to PI application server, and we added <SID>adm user also for that share folder. but when is use my share folder path in my file (NFS) channel, it's telling directory does not exist .

are we missing something here.

please suggest