by FJCC » Fri Nov 28, 2014 5:05 am
Here is a rough version. I check if the file name ends in ods because my desktop has all kinds of files.
- Code: Select all Expand viewCollapse view
directory = "C:\Users\fjcc\Desktop\"
newDirectory = "C:\Users\fjcc\Desktop\TargetFolder\"
file = DIR(directory)
While file <> ""
If RIGHT(file,3) = "ods" Then
fileURL = convertToURL(directory & file)
oDoc = StarDesktop.loadComponentFromURL(FileURL, "_blank", 0, Array())
'do stuff here
oDoc.storeAsURL(convertToURL(newDirectory & file), Array())
oDoc.close(TRUE)
End If
file = DIR()
WEnd
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.