Title | Under | Posted on |
---|---|---|
Component interface Error: no rows exist for the specified keys | PeopleSoft Technical | 03/15/2019 - 3:54am |
ADD 24 months starting from current month.(peoplesoft) | PeopleSoft Functional | 07/29/2018 - 8:44pm |
TRC values dropdown | PeopleSoft Technical | 04/04/2018 - 12:54am |
how to find missing sequence in GRID and print the mising sequence number while saving through peoplecode | PeopleSoft Technical | 09/11/2017 - 4:49am |
Why call a unix script to do the rename while you can do the rename right from your PC? Below is a function that I wrote that uses unix commad to move "rename" the file on a unix server where PC is running. To rename the file, just move it to the same direcotry with a different file name.
rem -- function to move files on the same app server from one directory to another;
rem -- All params are required;
rem -- The function returns true if executed successfully;
If All(&sFilePathFrom, &sSourceFileName, &sFilePathTo, &TargetFileName) Then
rem -- make sure path has "/" at the begining and the end. example: "/prod/ap/files/";
&sFilePathFrom = "/" | RTrim(LTrim(&sFilePathFrom, "/"), "/") | "/";
&sFilePathTo = "/" | RTrim(LTrim(&sFilePathTo, "/"), "/") | "/";
&ExitCode = Exec("mv " | &sFilePathFrom | &sSourceFileName | " " | &sFilePathTo | &TargetFileName, %Exec_Synchronous + %FilePath_Absolute);
If &ExitCode <> 0 Then
MessageBox(0, "", 0, 0, ("Problem moving file from " | &sFilePathFrom | &sSourceFileName | " to " | &sFilePathTo | &TargetFileName));
Return False;
Else
MessageBox(0, "", 0, 0, ("File has been moved from " | &sFilePathFrom | &sSourceFileName | " to " | &sFilePathTo | &TargetFileName));
Return True;
End-If;
Else
MessageBox(0, "", 0, 0, ("Missing param - all 4 params must be passed to the function."));
Return False;
End-If;
End-Function;
Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog