How to modify the last modification date of the folder under WEBSHELL? - web

Windows/IIS/ASP.NET environment
return with powershell command
An exception occurred while setting 'LastWriteTime': "The file 'D:\xxin' is in use by another process, so the process cannot access the file."

Related

Blueprism Issue with Finding File

I have a process which zips a file and emails it on. The process works most of the time. However, every so often I get an error message similar to the below.
ERROR: System Exception : Could not execute code stage because exception thrown by code stage: Could not find a part of the path 'T:\Path\Folder\File.zip'.
This is strange as it is able to find the original excel file, then zip it.
If I use the location from the error message I am able to find the file.
Is there an issue with the time it takes for the machine to find the file? Is this a bug?
It may happen that the file is getting zipped and you are trying to pick it up for sending mail, So solution Can be
Give some wait of 1 or 2 sec after zipping (as it may require some time for finishing work Not sure.)
While sending mail please ensure the file exists at location
If Point 2 is true, send the email with attachment
If point 2 is false, Raise the error to main process: "Zipped file not found"
After the zipping the files, if not created/zipped retry for 3 time or you can raise the error "Error: while zipping the files".
Ensure that zip file name should not contain any special character like ` , :
By doing so, we can able to find where the exact error is, whether is is on zipping code or file existence.

Finding and saving present directory of a SAS-Studio-program in a Linux server

I am trying to make a macro variable in SAS Studio which saves the "present working directory" as a macro variable.
The SAS-program is run in a "CPF" process flow file in SAS Studio, and the whole SAS-file and processes are saved and run in a Linux server.
In SAS-Studio, the location of CPF-process flow file seems like in the directory /sasdata/model_v1, and when I run a Linux command like X "pwd" then I expect that the result will give /sasdata/model_v1, but I get another directory instead like /sasinstall/sasconfig/Lev1/SASApp instead, I guess the the process flow file with CPF-suffix is run from this directory.
So the question is how I can find and save the working directory of my cpf-file and save as a macro-variable, or even maybe for my other sas-files too, I may need the solution for both SAS-files and CPF-files.
If I find the directory, then I guess it should be enough to save them as macro-variable by using %let macrovariable = "/directory"
I don't think SAS will show you the path of the process file. It doesn't in SAS/Studio 3.5.
It will set the path for a normal program file (as long as you have saved it) in the _SASPROGRAMFILE macro variable.

How to capture the Notes Data directory specified in notes.ini?

I need to get the value for the Notes data directory. I need it for a scheduled agent I am going to run. The program directory and data directory are on separate drives.
I thought the following code would work but I am not getting a return value.
String console = session.sendConsoleCommand(servername, "show config Directory");
//Code runs but the following line does not display anything
System.out.println(" Here is console value: " + console);
There are not any permission or other errors. What am I missing?
V/R,
Kev
Why use this obscure construct? Do you need the directory of ANOTHER server?
If you need it from the server where the agent runs then just use
String directory = session.getEnvironmentString("Directory", true)

SSIS File System Task Copy to New Excel File Name w/Date Variable Not Found

I have an SSIS File system Task to Copy an Excel template and create one with a date appended. I get the error saying "the connection is not found. This error is thrown by Connections collection when the specific connection element is not found." It's not found because I'm trying to make it!
The preceding error says "Error at File System Task: Failed to lock variable "c:\Reports\Unregistered_20150915.xlsx" for read access with error 0xC0010001 The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created".
I'm new to this, and all I want to do is run a procedure nightly and put the results in a new Excel file with the date name appended to the end. My plan was to take a blank worksheet/file and copy it into a new file, then execute the procedure on the server to load into this new file. As you can see, the variable is filling in the date just fine, so I don't understand how it says the variable cannot be found.
I've used these pages for guidance, but I am taking some of this and some of that, obviously missing something in between:
Including the Date in a Filename in SSIS using an Expression
and SSIS: Export a Query Result to a File
Any suggestions, articles, or videos would be vastly appreciated.
I found the error. When I set the destination variable, I also had an expression that kept kicking the variable out and using the evaluated result, which is not the name of the variable. I guess in some way that only a newbie can, I created the variable with the expression and created an additional expression which the program was trying to use concurrently.

Octopus-deploy; transform files being deleted

When we ran our deploy from octopus deploy, we failed on our last step. I will include the error message, but the main problem is that it seems to be deleting our transform files. We have the checkbox marked to automatically run configuration transform files, but it results in them being deleted. Anyone else run into this problem or possibly know how to fix it?
The error message is:
Set-Location : Cannot process argument because the value of argument "path" is null. Change the value of argument "path" to a non-null value.
When we went to check the files from there, we noticed they were being deleted.
Octopus deletes the config transforms after executing them by design. That is not causing your deployment to fail.
Your release is failing because you are calling the PowerShell cmdlet Set-Location and passing a null value to its Path parameter.

Resources