Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

hyptechdev@...

thank you

martin wrote:

Call the Session.GetFiles without the "remove" flag, wait 5 seconds, and then iterate the list of downloaded files returned by the function, calling Session.RemoveFiles for each.


thank you, this solution works
martin

Call the Session.GetFiles without the "remove" flag, wait 5 seconds, and then iterate the list of downloaded files returned by the function, calling Session.RemoveFiles for each.
Philky001

on the scp getfiles - can it have the delete portion put on a slight delay
or something like

session.GetFiles(RemotePath + "/" + fileInfo.Name, LocalPath + fileInfo.Name, ).Check();
// make some time delay for 5 seconds.

// now run to delete
session.GetFiles(RemotePath + "/" + fileInfo.Name, LocalPath + fileInfo.Name, true).Check();
martin

Yes, I'd say so.
Philky001

it happened one time only for past week. this means that someone was open that file is the only explanation?
martin

Re: Error condition remote serve file 'in use'

Well, we can hardly explain that.
We do not know anything about your server.

Is it happening always, with some files, randomly, ...?
Philky001

Error condition remote serve file 'in use'

HI I got this error: it seems the file trying to delete was in use. How would you explain this happening, since we only use the batch process now?

Is only explanation that someone was looking at this order at the moment the batch process was running?

Going further, what would you do to code to fix this issue?


Looping for WALMART
File Path \\SERVER-W02\ARCUST\IBS\DATA\ORDERS\WALMART\
File Tranfer successful from /outgoing/orders/WALMART//1277157481.md.neworders to \\SERVER-W02\ARCUST\IBS\DATA\ORDERS\WALMART\1277157481.md.neworders
Error Occurse:WinSCP.SessionRemoteException: Error deleting file '/outgoing/orders/WALMART/1277172050.md.neworders'. ---> WinSCP.SessionRemoteException: Permission denied.
Error code: 3
Error message
from server: Failed to delete file /outgoing/orders/WALMART/1277172050.md.neworders: The process cannot access the file
'\\COMPLETEFTPFS01\sftp_share\sftp_fs\outgoing\orders\WALMART\1277172050.md.neworders' because it is being used by another process.



--- End of inner exception stack trace ---
at WinSCP.OperationResultBase.Check()
at SFTPGetConsole.Program.Main()