Use Azure Logic App to Delete Old Files in Azure file share - azure-storage-files

Have an Azure Storage Account with a File Share for backup files. Want to keep 5 days of files in that file share and automatically delete anything older than 5 days.
Trying to use a Logic App to perform this task but using the value LastModified doesn't pull the LastModified date off of the file. I just get Null.

Yes, that is a known problem and is mentioned here. Instead, you can get the "LastModified" form "Get File Metadata" for each "value" after you get "List Files".

Related

Alfresco conent store deletion

I have conentstore configured in below content store location.
D:\alfresco-content-services\alf_data\contentstore**2019**
I want to delete above shown 2019 folder under conentstore. I dont need 2019 anymore. Basically purging .
If i delete files above folder ,will it clean-up the metadata and indexes also ?
or will it corrupt my respository ? Whats the best way to achive mass deletion , which will delete references in database also without corrupting repo ?
Thanks & Regards
Brijesh
If you delete any folder from the content store, it will not affect the database (and hence the indexes) in any way. You will end up with nodes referencing .bin files that do not exist anymore, though.
Note, if that folder is the first year in your content store, then it also contains some files used by Alfresco to determine if the content store matches the database. Depending on this, if you delete the folder - you will mess up Alfresco (repository will not start if it does not find those files).
Mass deletion in general is tricky, I'd suggest using Bulk Import Tool's delete web script that does this as fast as possible (avoids audit logs, recycle bin, etc).

Deleting file from dam (publish server) will delete automatically from author server?

I've implemented code to delete the uploaded files from DAM storage[CRXDE] , I've one doubt will the code delete the file from author server too? If not how to delete the file simultaneously from author as well as 4 publish server.
With the below code , the file is getting removed from publish CRXDE.
Code:
AssetManager assetManager = (AssetManager) resourceResolver.adaptTo(AssetManager.class);
String damUtil=DamUtil.assetToBinaryPath(selectedFileName);
assetManager.removeAssetForBinary(damUtil);
To replicate changes from publish instances back to author instances you can use a mechanism called reverse replication. Normally, you replicate changes from an author to a publisher. This is the reverse operation to this, hence reverse replication.
Since it is a big topic I would like to point you to the official Adobe documentation for more information on how to configure reverse replication:
Official (reverse) replication documentation by Adobe

What is the best way of storing last run date-time/ execution date-time for windows service?

I have a windows service that runs every 1 hour. I would like to store the last run date-time so that I can check the value (last run date-time) every time the service runs.
This value is used as one of the parameter for stored procedure used by the service to get data.
Now, my question is what is the best/ideal way of storing this last run date value?
I can think of 3 ways:
Store it in a database table.
Store it in a text or XML file in the application folder (question here is: is it good to create a text
file in application folder and update it every hour?).
Create a section in config file and update it every time service is executed.
Experts, please advise.
If you have a single service that needs to check the last time the process it executes was run to completion, I would store in as a user setting item. If you are thinking that maybe you'll have many services that share this task, putting it a shared location (like a database) would be helpful--although, it should be easy to migrate the data from user setting to a database should you need to use multiple services.
I would avoid a custom XML or data file simply because there's already support for user (run-time) settings in .NET and Visual Studio.
Update:
If you want to use user settings, you can simply double-click the Settings in Solution Explorer (under Properties in a Project) or in the properties for a Project, select the Settings tab. Add a value with a User Scope (probably of type System.DateTime. And if you named LastExecuted it you would use code like the following to update the value:
Properties.Settings.Default.LastExecuted = DateTime.Now;
Properties.Settings.Default.Save();

ADODB recordset error "Operation is not allowed when the object is open" (3705)

I have a legacy ASP application that I support. By support I mean that I haven't touched it since about 2005 because its just worked.
However there were a couple of data issues in the Access database that the ASP application uses. So like a fool I opened the database directly over a fileshare (using MS Access 2007), fixed the data and saved it down (in Access 2000 format).
Now the application will retrieve and display the data OK, but any updates fail with the error 3705: Operation is not allowed when the object is open. I have not changed the code in any way, the only change was the data update and database save.
I've found plenty of examples of this error, but they all relate to fairly simple issues like ensuring the recordset is closed before opening it, changing the CursorLocation enum, etc. I've tried most of these in the vain hope that something will work, but nothing has.
Any ideas how can I fix this?
Thanks.
UPDATE
I've installed a web based access database management system, and have tried to compact and repair the database. I received the error:
The Microsoft Jet database engine cannot open the file '<snip>'. It is
already opened exclusively by another user, or you need permission to view
its data. (-2147217911)
I have run the macro detailed here to determine who is logged onto the database, and just showed the admin user (which was me - while running it)
Those errors mean one thing: the database file is opened by some other process and thus is being locked.
Most likely that "web based access database management system" is the culprit, try to find how you can configure it to not lock the file, or get rid of it.
As a work around or way to verify the real problem, you can copy the .mdb file into different location and change the classic ASP connection string to check if you can update the database in its new location.
#Remou's comment above about checking the file and folder permissions was correct.
I had our server admin check the permissions, and it seems that the write access had dropped off the folder (and the files also inherit their permissions from the folder). He said that this has happened before when saving directly over the fileshare.
(accepting in lieu of an answer from #Remou)

each web online user connect with there own acces .mdb? how to do that

in my project, when a new user register online on my website, then my project create a directory on server with the user name "abc" and copy a myDB.mdb file in it.
this .mdb file contains predefined 2 tables.
now my question is :
1 is it possible to connect and use with Dataset.xsd in this task.
2 how each user read and write data with there own myDB.mdb file
3 how to make the connection string flexible. so it ll connect with each user myDB.mdb file.
I don't have any clue that how to complete it. i worked with dataset.xsd and vb asp.net but those were static dataset.xsd or predefined .xsd
JS
Oh, please don't do this. You really, really, really need to avoid this approach at all possible costs.
I strongly suggest that you install the free SQL Server Express, or MySQL, or any other multi-user database and store your data in there instead.
Doing this will preserve your sanity both when creating the initial implementation and when you have to update a column or a table in all of the MDBs that have been created for your end users.

Resources