I would like to know if is it possible to create a symbolic link which points to the last created file of a specific directory.
I have a folder which contains several HTML reports and I need a symlink for get the last generated report.
Because of I don't know when a new report has been generated I must use a script on the crontab, so I'd like to know if a better way to do could exist.
Related
I am currently working on a coding project and I am running into trouble with how i Should import the data set. We are supposed to have it read in a way so that our instructor can access our markdown file and be able to import the data and run the code without changing file paths. I know about using relative file paths to make it accessible to anyone, however I don't know how to get around the /users/owner part of the file path. Any help would be greatly appreciated and if you have any further questions feel free to ask.
I've tried changing the working directory to a certain folder that both I and my instructor have named the same thing, however, like I said above, when I use read.csv to import the data frame I am still forced to use the /users/owner filepath which obviously is specific to my computer.
I can understand your supervisor, I request the same from my students. My recommended solution is to put both data and R script (or the .Rmd file) in the same folder. Then one does not need to add a path in the read.csv (or similar) function.
If you use RStudio, move to the folder in the Files pane and then use the gear icon and select "Set as Working Directory".
Then send both files (.R or .Rmd) and the data to the supervisor, ideally as a zip file. The supervisor can then unpack it to an arbitrary folder and just double click to the .R/.Rmd file. The containing folder will then automatically become the working directory.
Other options are:
to use a subfolder for the data or
to put the data to a publicly readable internet location, e.g.
Github and read it directly from there.
The last option requires of course that the data have a free license.
I am using a quite unknown bookmark manager on Android. I picked this one after trying others because it was possible to import, export, classify by folders, the design was good and it was easy to search in my bookmarks.
After importing all my bookmarks from other browsers and also from files, I started classifying all of them into folders, subfolders, etc..
I spent many days to classify them all as I wanted.
After classifying them, I tried to export them.
The problem is that the only option offered is to export them in a .html file, containing all the bookmarks but without any folder.
The .html file contains all my bookmarks but in complete desorder, and doesnt mention the folders.
In the app there was also a "backup" function, so I tried and it creates a .db file.
I opened this .db file with some SQLiteViewer app and I found written inside, among other things I dont understand, a list of all my bookmarks with a number next to each one of them, and also a list of my folders with next to them the corresponding number.
When I open the .db file, I have a choice between
-SQlite master
-android metadata
-bookmarks
-folders
-sqlite sequence
If I click on "Bookmarks", all my bookmarks are in a kind of spreadsheet with lines and columns. Next to them in another columns, for example for each bookmark related with "Kitchen recipes" it's written the number 1.
And in the "Folders" folder, next to the folder called "Recipes" its also written 1.
So I'm happy because it seems that my classification is stored in this file.
But the fact is I dont know how to extract easily all that data, and create with it a "bookmark" file importable in other bookmark app or browser ( for example .csv or .xbel or .html but with folders)
I guess I need some "script" working like this:
if the first raw in "Folders" got the number 8 next to it
Then take all the bookmarks in the "bookmarks" folder that also got an 8 written next to it, and put it inside this folder.
I'm a complete noob in coding, I dont know what is SQlite, nor anything.
So i know that maybe I am asking for too much informations at the same time.
But if some kind person could put me in the way, by explaining me if
thats possible
what would be the easiest way
if some solution already exist
if someone like me can do it and what do I have to learn if I want some day to be able to do it
Thanks
Here's pictures so you understand easier:
Sqlite
Folders
Bookmarks
I wonder how to create a PDF or Word document automatically from the repository when I create a new folder in the document library.
Thanks in advance.
I don't really understand what you exactly mean. Buy I guess it can be done by a rule or behaviour.
Create a rule on the root folder where your folders will be created. Set the incoming type to be folder.
As the action execute a JavaScript.
If you look at the JavaScript API Cookbook, there are samples on how to create a file. Creating PDF's or Word from scratch is a bit difficult hence the binary content isn't plain text.
We currently use clearcase on a project, and there is an HTML file that was generated with clearcase that contains all of the filenames of the files that were included in a label.
I am supposed to generate this file with a different label. I know how to get all of the filenames that were included in a label using the cleartool command line, but that doesn't help me with generating the file. I don't want to manually take that list and create the HTML file. So, how do I create this file?
I currently do not have a copy of the HTML file, but I have seen it. Hopefully this question isn't too confusing and too vague. I'm still relatively new to clearcase and just found out some of the cleartool commands today, so hopefully this is an easy question to answer.
I am not sure about the exact HTML file you are referring to. Do you have an example of its name, and of its content? If you edit your question with those data, I will be able to add to this answer.
But anyway, if that file is not generated directly by ClearCase, the solution remains to parse a cleartool find command (see also Additional examples of the cleartool find command article)
cleartool find . –version "lbtype(MY_LABEL-1.0)"
and to build your html file with, for instance, a Perl script.
You could even add this action into a ClearCase sub-menu entry, like illustrated in the ten best scripts article.
What you might be looking for is Report Builder (also known in ClearCase Explorer as Report Wizard). In Report Builder you can navigate to Elements/Labels which has the "Elements with Labels" and "Versions with Labels" reports. After the report runs you have the option to save the results as HTML, XML, or CSV.
Is there any method to extract zip files and maintain the same folder structure in the output folder.I am able to extract the zip file and its inner files but not able to extract folder from a zip file and thus fail to maintain folder structure also.
Yes.
There is an AS3 component that allows you to read and write data from zip files, and the demo also shows that it is possible to see the folder structure.
http://www.nochump.com/blog/?p=15
I have not used this component myself, but if I am correct in assuming that you are making an AIR application then this component may automatically generate folders, otherwise you can use the file system api to create the correct folders yourself.
Good Luck!
You may also want to check out fzip:
http://codeazur.com.br/lab/fzip/