MoveFile and SWIFT

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Junior Coder
Posts: 44
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,

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

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
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,

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

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 |

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

Post Reply