MoveFile and SWIFT

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ADP_MAN
Junior Coder
Posts: 45
Joined: Wed Apr 07, 2004 2:04 pm

MoveFile and SWIFT

Post by ADP_MAN » Tue Feb 05, 2019 10:18 pm

Hi All,

I am currently using MacroScheduler to help control file movement when working with the financial application "SWIFT". When transmitting certain files, I first have the files delivered to a "temporary emission" folder. From there, depending on if the server is the main or backup server, the file is either deleted or moved (using MoveFile) into the actual emission folder for delivery to the banks.

When the file is delivered into the actual emission folder using MS, it does not get processed by SWIFT correctly. It should recognize the file is there, then archive the file. The file is only archived successfully when I manually move it from the temporary emission folder into the actual emission folder. This does not occur when MS moves it from the temporary emission folder to the actual.

I'm going to attempt to move it using "copyFile" and see if that helps. Any other suggestions on what to do or why this may be happening?

Thank you,
Dom

User avatar
Djek
Pro Scripter
Posts: 148
Joined: Sat Feb 05, 2005 11:35 pm
Location: Holland
Contact:

Re: MoveFile and SWIFT

Post by Djek » Sun Feb 17, 2019 4:28 pm

hi Dom,
you can try this;
had similar problems (in 1 percent of the copies) with copyfile,
it looked to me if the other external application accessed the file too early,
and with me, the problem was solved by putting
let>CF_ANIMATE=1
before the copyfile

(Movefile also uses the cf_animate)
Seems to me, now the windows system "knows" when the file is properly copieed.
But i dont know for sure,
perhaps someone from the support team can explain this.

kind regards,
Djek

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: MoveFile and SWIFT

Post by Marcus Tettmar » Mon Feb 18, 2019 8:30 am

CopyFile uses the Windows copy function. Windows does the job. CF_ANIMATE just tells Windows to use its animation when it does so. It does not change how it copies. What it *MIGHT* do if you think about it is SLOW things down because there's extra work involved. And since most issues turn out to be timing, and apps not being finished or ready before you try to do something, that tiny slow down caused by the animation might be why it suddenly seemed to fix it. Sounds like you probably just need to give things a bit longer.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

ADP_MAN
Junior Coder
Posts: 45
Joined: Wed Apr 07, 2004 2:04 pm

Re: MoveFile and SWIFT

Post by ADP_MAN » Tue Feb 19, 2019 3:16 pm

Thanks for your replies!

Dom

samairahsethi
Newbie
Posts: 1
Joined: Wed Mar 13, 2019 9:26 am

Re: MoveFile and SWIFT

Post by samairahsethi » Wed Mar 13, 2019 9:29 am

Excellent answer by Marcus Tettmar. Thanks for the answer. It was helpful for me. As I was searching the answer for the same question!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts