$(function () { pageContext.i18n.modTalk = 'moderation talk'; pageContext.i18n.replyToComment = 'Reply'; pageContext.i18n.modTalkEmpty = 'moderation talk is empty'; pageContext.url.getModTalk = "/comments/%25ID%25/listModTalk.json"; pageContext.url.possibleCommentRecipients = "/comments/%ID%/possibleRecipients.json"; pageContext.url.commentEdit = '/comments/%25ID%25/edit.html'; pageContext.url.commentView = '/comments/%ID%/view.html'; pageContext.i18n.commentVisibility = { 'full': 'Viewable by all users', 'op': 'Viewable by the original poster', 'mod': 'Viewable by moderators', 'opAndMod': 'Viewable by moderators and the original poster', 'other': 'Advanced visibility', 'dialogTitle': 'Comment visibility', 'selectGroups': 'Visible to groups', 'selectOther': 'Other recipients', 'selectOriginalPoster': 'Original poster', 'selectModerators': 'Moderators', 'selectAssignees': 'Asked to answer users' }; pageContext.i18n.commentMenuLabels = { 'comment-edit': 'comments.menu.edit', 'comment-delete': 'comments.menu.delete', 'comment-convert': 'comments.menu.convert' };pageContext.i18n.answer= { bestAnswer: 'Best Answer', controlBar : { accept: 'Accept', unaccept: 'Unaccept', acceptCommand: 'Accept this answer as correct', cancelAcceptedCommand: 'Remove this answers accepted status' } }; window.croles = { u: false, op: false, m: false, og: false, as: false, ag: false, dc: false, doc: false, eo: false, ea: false }; tools.init({ q: { e: false, ew: false, eo: false, r: false, ro: false, d: false, dow: false, fv: false, c: false, co: false, p: false, tm: false , ms: false, mos: false }, n: { f: false, vf: false, vfo: false, vr: false, vro: false, c: false, co: false, vu: false, vd: false, w: false, wo: false, l: false }, c: { e: false, eo: false, d: false, dow: false, ta: false, tao: false, l: false }, a: { e: false, ew: false, eo: false, d: false, dow: false, a: false, aoq: false, ao: false, tc: false, tco: false, p: false, tm: false }, pc: croles }, { tc: true, nsc: true }); commandUtils.initializeLabels(); }); Skip to Content
0

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

Feb 17, 2017 at 11:50 AM

285

avatar image

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 .

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Manoj K Feb 17, 2017 at 12:10 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
Manoj K Feb 17, 2017 at 12:50 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded