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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ajaykumar1
Creator III
Creator III

Folder change from one drive to other drive.

Hi Everyone,

Need help to achieve the below.How can I move my entire folder to other drive.Otherwise it will be very difficult to change each and every app path.

I have to move my folders data from one drive to other drive due to some space problem.

Currently i have the data in F Drive then it should move to G drive.I want to move atleast entire'Concat' folder.

I have used the below dynamic path.

set PathQvdOriginal = '..\..\qvd\original\';

set PathQvdDerived = '..\..\qvd\derived\';

set PathQvdMerged = '..\..\qvd\merged\';

set PathQvdConcat = '..\..\qvd\concat\';

The below kind of scripts I have as part of my project.

Table1:

LOAD *

FROM $(PathQvdMerged)audit\customer_year_*.qvd (qvd);

store Tbl into $(PathQvdConcat)audit\customer.qvd;

drop table Tbl1;

Table2:

LOAD *

FROM $(PathQvdMerged)audit\sales_year_**.qvd (qvd);

store Tbl into $(PathQvdConcat)audit\sales.qvd;

drop table Tbl2;

I hope your understand my requirement.

More thanks,

Ajay

12 Replies
PrashantSangle

Hi,

While developing your app if you used relative path.

then by smiply moving entire qlikview files structure from one drive to another drive will not make any issue.

I you are not using relative path while developement.

Then sad to say you have to change each and every app path.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable

please check you relative path option is checked or unchecked,for the best practice always check Relative path option under script editor

snap.png

avinashelite

Hi Ajay,

Currently how you are managing the document path ???? if you  have set the variables for the same then, re set the variables with the new folder path this will do your requirement.

ajaykumar1
Creator III
Creator III
Author

Thanks All..my app level that 'relative path' is not checked.

Is it will work if am checking the Relative Path now and later i can try to move directly?

More Thanks,

Ajay

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Is it just your data that moves (space getting scarce)? Then this might help:

  • Put your path variable definitions in an include file (a simple text file that contains those four SET statements for example). Let's say that you call it settings.qvs or settings.ini.
  • Make the paths into absolute paths.
  • Put settings.qvs/settings.ini in a fixed location.
  • Include the settings.qvs/settings.ini file iat the start of every load script. You can use a relative path for this one if your settings file stays put with respect to your document(s). For example:
    $(include=..\..\Includes\settings.ini);
    will make sure that every document knows where to fetch data from.

Of course, YMMV. For instance if you use a DEV/QA/PROD flow, add a platform definition variable to all paths, and an IF-THEN-ELSE to all scripts that extracts the current platform from the current (document) working directory and stores it in that new variable.

Sorry if this boils down to almost the same amount of work as changing all individual path definitions. On the other hand, you'll have to do this only once

Best,

Peter

ajaykumar1
Creator III
Creator III
Author

Thanks All once again...I will do that manually.

Bad Luck 🙂

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Not really. Text editors often do offer a Search&Replace that handles files and directories. Notepad++ does ("Find in Files...")

But make sure that won't have to do it again. Ever...

ajaykumar1
Creator III
Creator III
Author

Sure Peter....I got one idea to do this.

set PathQvdOriginal = '..\..\qvd\original\';

set PathQvdDerived = '..\..\qvd\derived\';

set PathQvdMerged = '..\..\qvd\merged\';

set PathQvdConcat = 'G\qvd\concat\';

In the above i will change my path of New drive(G Drive).Then i will paste my all data in new(G) Drive.So hopefully it work in the places wherever i used the $(PathQvdConcat)


Correct me if my understanding is wrong.

Thanks,

Ajay

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Put a semicolon between G and the first slash.

Indeed, this will store all your QVD's in the new location. But what happens next? Isn't there some document that tries to read from those QVD's? Because it will still refer to the original location if it doesn't make use of the changed path variable. And the other unchanged variables tell me that you do not plan to move your Merged/Derived/Original source files?

If there is always a common root for source and/or target files, this may also make life a bit easier:

SET PathSourceRoot = '..\..\qvd\';

SET PathTargetRoot = 'G:\qvd\';

SET PathQvdOriginal = '$(PathSourceRoot)\original\';

SET PathQvdDerived = '$(PathSourceRoot)\derived\';

SET PathQvdMerged = '$(PathSourceRoot)\merged\';

SET PathQvdConcat = '$(PathTargetRoot)\concat\';