Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
madhubabum
Creator
Creator

How to Moving, Renaming files from one folder to another folder in Script ?

Hi Experts

I have Multiple files with different Names:


OldFilepath :D:\Old_data\;

Filenames : Book1,Book2,Book3,....Book10

Note :Store Old Files into Updated_data folder with Different names

UpdatedFilepath :D:\Updated_data\;

Rename To Filenames as following : UpdatedBook1,UpdatedBook2,.......UpdatedBook10

Please help to write the script ,

Thanks

Madhu

5 Replies
karthikeyan1504
Creator III
Creator III

Hi Madhu,

there is no way copying a file from one folder to another in your computer.

Please try shell script batch file to do this...

roger_stone
Creator III
Creator III

You can create a Windows batch file and call it from QlikView using the EXECUTE statement. That should do what you're asking for.

madhubabum
Creator
Creator
Author

Hi Roger Stone

Thanks for your advice .

But , How we can create and execute the batch file in qlikview script. Please help to me write the script

karthikeyan1504
Creator III
Creator III

you cannot write the script in qlikview..

It is outside of qlikview, please refer this link,

http://stackoverflow.com/questions/4601161/copying-all-contents-of-folder-to-another-folder-using-ba...

roger_stone
Creator III
Creator III

Create a Windows batch file - as I don't know your exact requirements, folder names etc, I can't write that for you. Lets say it's called log.bat

In your QlikView script, you need something like:

Execute cmd.exe /C C:\BatFiles\Log.bat