Registered Member
|
I would like to script the location of a Folder View so that it points to a different directory each day.
Specifically, we have a file share where we keep daily data in dated folders (in a specific format), and I would like the folder view to keep up-to-date with the current one which is named for the previous week day (yesterday, unless yesterday was a Saturday or a Sunday, in which case it would be last Friday). I would like this updating to occur on plasma startup and at a scheduled time (midnight) each day. Of interest for any solutions is that I'm running KDE on Windows, so my use of *nix utilities is very limited.
airdrik, proud to be a member of KDE forums since 2008-Dec.
|
Administrator
|
Not sure if it works, but maybe you can use a symbolic link and make a script that changes the target. As far as I know NTFS symbolic links were introduced in Windows Vista.
Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.
10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts |
Administrator
|
A Plasma javascript would most certainly be capable of this, however I am not sure how one would write the script having not done it myself. You may wish to check the Javascript documentation on Techbase.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Looking at Techbase (http://techbase.kde.org/KDE_System_Admi ... pScripting), I was able to put together a Javascript that will do what I want, however two of the ways it says you can run the scripts are one-time-only deals (either when the application runs for the first time with no config, or if the path to the script isn't in the Updates group of the application's config), whereas I want this to run once-a-day everyday. (as a side note, the interactive console for writing and running javascripts has a couple of bugs on Windows that basically dissallows one from opening already-written scripts).
As for symbolic links - apparently Symbolic and hard links are only available in Vista and later versions of NTFS. In WinXP, there are Junctions, but you still need a 3rd party program or the paid-for Windows resource kit to make them. (for now, at least) I'm not going to bother.
airdrik, proud to be a member of KDE forums since 2008-Dec.
|
Administrator
|
Can you please file a bug regarding the interactive console being able to open already written scripts?
As a workaround to not being able to run your script daily, you could write a small plasmoid using javascript which would simply invoke that script upon its startup.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar