[iLogic] copy external file from A to B and delete original file

[iLogic] copy external file from A to B and delete original file

amarcoc
Advocate Advocate
1,934 Views
1 Reply
Message 1 of 2

[iLogic] copy external file from A to B and delete original file

amarcoc
Advocate
Advocate

Hi.

 

I need to do a simple task using iLogic

 

I want to move a file from:

"C:\TEMP\OUTPUT"

to:

ThisDoc.Path & "\PDF Automaticos\"

or maybe copy file and delete original.

 

How can this be done? I have searched but didn't find the solution.

0 Likes
Accepted solutions (1)
1,935 Views
1 Reply
Reply (1)
Message 2 of 2

clutsa
Collaborator
Collaborator
Accepted solution

Should be as simple as...

Dim source As String = "C:\TEMP\OUTPUT\TargetDocument.txt" 'change as needed
Dim destination As String = ThisDoc.Path & "\MyNewName.txt" 'change as needed
Dim fso = ThisApplication.FileManager.FileSystemObject
fso.copyFile(source, destination, True) 'True to overwrite
fso.DeleteFile(source)

 

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates