Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
shree909
Partner - Specialist II
Partner - Specialist II

loading of files from source folder to destination folder through script

Hi ,

I have a scenario where  i get the files daily.

Example   abc1.txt

                  abc2.txt,

                 abc3.txt and so on...  //  these files are in source  directory

Now i want to generate a qvd from the existing files and move to    destination directory...

when ever a new files are added to the source directory   daily.  so the next time when i generate a qvd it should load only files that are added are not present

and store as a  new qvd in the destination directoy..

Thanks

sri

1 Solution

Accepted Solutions
evan_kurowski
Specialist
Specialist

Hello Shree,

To actually move the source files from their original directory to the archive directory, you will have to enable file system access in the application.

Once that is done you can then use the EXECUTE command in order to actually run the DOS command for moving a file from location A to location B.

If you just wanted to make a copy of the file in .CSV format and save it in a second location, you could use the following syntax with the (txt) argument of the STORE command.

[input_csv]:

LOAD *
FROM [$(vOriginalLocation)\ORIGINAL.csv]
(
txt, codepage is 1252, embedded labels, delimiter is ',', msq);

STORE * FROM input_csv INTO [$(vOutputLocation)\CSV_from_QV_output.csv] (txt);

View solution in original post

6 Replies
Anonymous
Not applicable

Hi,

Something along the lines of this:

Let vDate = Today();

T1:

Load

     *

From \\Machine\folder\abc*.txt;

Store T1 into \\Machine\Folder2\ABC_$(vDate).qvd;

Drop table T1;

narender123
Specialist
Specialist

Hi Shree

When ever you create a new qvd ,you should drop that new qvd in the same location after store command.

Eg.

New:

Load

Name,

City,

Address

from ...........*.txt;

Store NEW into \\your path location....\NEW.qvd

Drop Table NEW;

So in next time you can store another qvd like NEW2,after that drop theNEW2 qvd.

I think this will help you. Try it.

Thanks.

Regards:

Narender

shree909
Partner - Specialist II
Partner - Specialist II
Author

thanks for the reply ..

i  want to move the files that are source directory to the destination directory..

once the files are processed and generated a qvd then i want to move the source files(.csv ) files into the destination directory...

Not applicable

hi all,

cany anyone tell me how to copy all files from one folder to another folder in qlikview

evan_kurowski
Specialist
Specialist

Hello Shree,

To actually move the source files from their original directory to the archive directory, you will have to enable file system access in the application.

Once that is done you can then use the EXECUTE command in order to actually run the DOS command for moving a file from location A to location B.

If you just wanted to make a copy of the file in .CSV format and save it in a second location, you could use the following syntax with the (txt) argument of the STORE command.

[input_csv]:

LOAD *
FROM [$(vOriginalLocation)\ORIGINAL.csv]
(
txt, codepage is 1252, embedded labels, delimiter is ',', msq);

STORE * FROM input_csv INTO [$(vOutputLocation)\CSV_from_QV_output.csv] (txt);

Anonymous
Not applicable

The post on this thread from Evan Kurowski was accidentally. In order to restore points to all participants I have copied and reinserted this comment. Thanks for your patience!