URGENT: How can we move files from one windows folder to another in Lotusscript

We have converted emails to .msg format through tool and stored it to Shared Drive with the title of _DocUniqID.msg

C:\2013_ABN464646464646ADGASG000464645AG.msg

C:\2014_ACB464646464646ADGASG000464645AG.msg

Now we would need to segregate the msg files into year wise and stored into another shared drive as below

Z:\2013\ABN464646464646ADGASG000464645AG.msg

Z:\2014\ACB464646464646ADGASG000464645AG.msg

Can you guide me how we can move the files from one windows folder to another…heard that it can be done through windows API shell etc which I’m totally unaware and never worked on these fucntions.

Quick help on this will be really appreciate.

Thank you.

Subject: suggestion

Loop thru the directory using the dir command and then create one batch file and use the dos command move (Move | Microsoft Learn)

at the end just either run the newly created batch file using the shell command or let the use run the command

Subject: Copy file

Of course you can do it using the Win32 API. You would just write yoru own copy method there.

Or you could do as Barry suggests, create a batch file and execute that using the Shell() function.

Or you could be reallty lazy and use the built-in FileCopy() function in Lotusscript. Open the online help and search for “FileCopy”, there is even example code there.

Naturally you must get the file names to copy, but you use the Dir() function to do that.