Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to save a file in multiple folders

Hello everyone,

I have a problem with macros. Is there a way to cycle saving a file into several folders?

Example, I have to save the "abcd.xlsx" file in all folders of  -->  ..\MyFolders\data\*

There is one type of For Each ... DirList loop or something like that?

Thanks in advance.

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Save the file once, then copy it to the other folders. Search the internet for vbscript code using the FileSystemObject to copy files. See for example: CopyFile Method


talk is cheap, supply exceeds demand
Not applicable
Author

I used these commands:

     Sub Multicopy

          FileSystemObject.CopyFile  dir_path&"MyFolders\data\Uno\abcd.xlsx",  dir_path&"MyFolders\data\"

     End Sub

but the macro does not work.