Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

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.