How to retrieve the original file name using PowerShell - powershell

Suppose I renamed multiple files by mistake and now I want change the file name as it was earlier.
example: The original name of file was “Test” through PowerShell we renamed it to “Tested” and again we want to retrieve the original name back and I don’t remember.

Unfortunately Windows doesn't store these information by default. You can enable auditing for a file (right click -> properties -> Security -> advanced -> auditing) to store these information in the future but right now, the answer is: It isn't possible.

Related

Using PowerShell (5.1) to EDIT outlook PST path

I know how to add or remove a store with PowerShell using Microsoft.Office.Interop.Outlook, but I haven't found any information about changing values.
I read https://learn.microsoft.com/en-us/office/vba/api/outlook.namespace#methods but I don't see a method available for setting properties.
Context: User's PST files have been moved from one path to another. I'm trying to avoid disruption wherever possible, so I'm writing a PS script to move the PST files, and then update Outlook with the new path.
Since removing and re-adding the stores will break user-defined stuff like rules, I'm hoping for a way to change existing store filepaths that will require no user action.
Is this possible at all?
As a second option, can I pull the existing rules, and modify them (or recreate them)?
PST store entry id embeds the PST path in it (you can see it in OutlookSpy - I am its author - click IMessage / IMAPIFolder / IMsgStore button, select PR_STORE_ENTRYID, click "..." next to the Value edit box).
If a rule includes a store id (e.g. copy / move message action), you would need to reset / recreate the rule.
I you don't want to remove / add a store, can reset the store location using ProfMan library (I am also its author) directly in the profile section in the registry. See https://www.dimastr.com/redemption/profman_examples.htm#example2 for an example on how to read PST paths. You can modify the script to set the path instead.

Office URI schemes, new file from template(nft) not saving the file in provided location

We are creating a new file from template as specified in the Office Uri Schemes documentation.
As per the documentation we can give an optional parameter with |s to specify the default path offered as a save location when the file is first saved. The only restriction is that if the optional default save location is supplied, it must be pointing to the same host name as the template.
We are using Office 365 group drive to save the template and the default save location(for newly generated file) is also in the same group drive. But it is not picking the default save location as specified.
Following is the URI that we are testing.
ms-word:nft|u|https://figg.sharepoint.com/sites/1dev/Shared%20Documents/Config/Files/Minutes.dotx|s|https://figg.sharepoint.com/sites/1dev/Shared%20Documents/Dest
The above url when opened generate a new file from template but it did not give the default save location specified in the command when we try to save the file.
Any help if how to fix this would be very helpful.
Are you sure about your save URL ? It looks truncated as Dest...
If it's correct, make sure that it ends with a forward slash, like this:
ms-word:nft|u|https://figg.sharepoint.com/sites/1dev/Shared%20Documents/Config/Files/Minutes.dotx|s|https://figg.sharepoint.com/sites/1dev/Shared%20Documents/Dest/
You also must make sure you have the correct permissions to write back to that particular document library
HTH

Values for %ACTUAL_PATH% Alfresco filing path property

I would like a user to drop a file into a smart folder, have an aspect attached to it, and have the file stored in a folder in a different location.
I have followed the smart folders tutorial, and read the "Smart Folder Template syntax" page (here https://docs.alfresco.com/5.2/concepts/sf-ref-template-guidance.html). The examples I have found only ever show "%ACTUAL_PATH%" as the value for the path property.
What alternative values are possible for the path property of the filing rule? In the following example folder hierarchy, a user would drop a file into "General" and we would like the file stored in "Approved".
Example structure is:
Documents
-> Approved
-> Archived
-> Incoming
-> -> General (a smart folder)
I appreciate any help with this
You can use:
1) XPAth
"/app:company_home/cm:Docments/cm:Approved"
2) You can drop to any other folder with rule on it, to specify more complicated logic to sort created files

Retrieving arbitrary Eclipse preferences programmatically

I am writing a plugin for Pig files. I would like to retrieve the Eclipse "file associations" preference - the one under General -> Editors -> File Associations -> File Types / Associated Editors.
Once I have this preference, my plugin can know which file types are being used, and act accordingly when iterating over the workspace files (in searches and the like).
I couldn't find a "directory" of preferences anywhere, nor an API that I could iterate over until I found it. Searching the file system of my workspace didn't seem to work either - possibly the preferences are being held in a binary format.
1) What is the key for retrieving this preference from the PreferenceStore?
2) What is the best way, in general, for finding the key for a given preference?
Use
IFileEditorMapping[] mapping = PlatformUI.getWorkbench().getEditorRegistry().getFileEditorMappings();
to get the mappings between file types and their supported editors. Look at this javadoc to see everything you could ever want to know about the mappings
I'll try to give you some hint, someone may have a better solution :
1 : id org.eclipse.ui.preferencePages.ContentTypes
2 : Use the Plug-ins Spy Press Alt-Shift-F1 on the desire page/widget on eclipse, it will display contextual informations
There is no overall API which will give you all the preferences.
Many preferences are stored in the workspace .metadata/.plugins/org.eclipse.core.runtime/.settings directory in 'plugin-id.prefs' files (Java Property file format). You can access these with
IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode("plugin id");
String value = prefs.get("preference id", defaultValue);
So you need to know the id of the plugin that owns the preference and the id of the preference itself. This information can be difficult to find and may involve reading the source of the preference page.
Other preferences are stored in the Eclipse configuration directory. Yet others are in some format only known to a particular plugin (but there is usually some API to access the information).

How to save message file in RAW format

One of our client does not know how to save/generate/produce/provide swift messages in its raw format via their swift alliance system, neither do i. By raw format i mean following format
{1:F21XXXXXXXXXXXX7108170239}{4:{177:1112071543}{451:0}}{1:F01XXXXXXXXXXXX7108170239}{2:O9502137111207XXXXXXXXXXXX54153885641112071537N}{4:
:20:XXXXXXXXXXXXXX
:25:XXXXXXXXXX
:28C:00237/00001
:60F:C090513AUD1162994,30
:61:1112061207D110,00NCHKFDD388407 //071211WDM9103
291111 GUJ
:61:1112061207D200,00NCHK3927611471 //071211WDM9104
090911 KAR
:62F:C090513AUD1610881,52
:64:C090513AUD1610881,52
-}{5:{CHK:XXXXXXXXXXXX}}{S:{COP:S}}
Is there any way/interface to integrate with SWIFT and extract these files Or is there any possibility to schedule SWIFT to generate these files Or even manual steps to do it?
Edit 1
Messages are saved by creating a profile from the application and setting connection type to "File Transfer". It will then keep generating files in ISO format to a shared location.
to get output file from swift you need to configure message partner CBSOUT
to do so do the following
enter to swift application SAE or SAA with super user.
click on
Application interface.
from the list right click on
CBSOUT and then enable
to configure CBSOUT double click on it.
Data format :select RJE
output path name : put the folder you want to store the files
output the extension : put the file extension example :out or txt.
session initiation select Auto.
number of message =1
finish.
good lucky.
byeeeeeee
Messages are saved by creating a profile from the application and setting connection type to "File Transfer". It will then keep generating files in ISO format to a shared location.