Thanks Narasimha.narasimha wrote:You could do it as a part of the same activity, just appendto your command (Assuming you want to remove edw directory)Code: Select all
&& rm -r /home/edw
Sequencer
Moderators: chulett, rschirm, roy
narasimha wrote:You could do it as a part of the same activity, just appendto your command (Assuming you want to remove edw directory)Code: Select all
&& rm -r /home/edw
I need to parameterize my path and I am not able to do it in the command field. I tried to use 'sh' earlier and then parameterize my path in the parameters field but it didnt work. So how would I parameterize the path.
Thanks
Break up your paramenters into directory and file - something like
DEL_DIR --> /home/edw/
DEL_FILE --> delstatus.txt
Command:
Parameters:
DEL_DIR --> /home/edw/
DEL_FILE --> delstatus.txt
Command:
Code: Select all
test -f
Code: Select all
#DEL_DIR##DEL_FILE# && rm -f #DEL_DIR##DEL_FILE# && rm -r #DEL_DIR#
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
Narasimha Thanks for the help but I got this message in director.narasimha wrote:Break up your paramenters into directory and file - something like
DEL_DIR --> /home/edw/
DEL_FILE --> delstatus.txt
Command:Parameters:Code: Select all
test -f
Code: Select all
#DEL_DIR##DEL_FILE# && rm -f #DEL_DIR##DEL_FILE# && rm -r #DEL_DIR#
Reply=1
Output from command ====>
It is not deleting the file or directory
![Confused :?](./images/smilies/icon_confused.gif)
narasimha wrote:Not sure where you are going wrong.![]()
Can you post the complete message from the director
Message:
delete_seq..JobControl (@ec_DeleteStatusFile): Executed: test -f /home/edw/deletestatus/home/edw/delstatus.txt && rm -f /home/edw/deletestatus/home/edw/delstatus.txt && rm -r /home/edw/deletestatus
Reply=1
Output from command ====>
The sequencer ran ok but it didnt delete the status file or directory.
Thanks
chulett wrote:The test failed, so no further steps were run. Is this really the full path to your status file?
/home/edw/deletestatus/home/edw/delstatus.txt
I don't think so.
status file path is /home/edw/delstatus.txt
directory path is /home/edw/deletestatus
I need to delete both of them. How would I accomplish this ?
Thanks
dspxguy wrote:Chulett, I am using two parameters and following what Narasimha adviced. but still cant make it worknarasimha wrote:Break up your paramenters into directory and file - something like
DEL_DIR --> /home/edw/
DEL_FILE --> delstatus.txt
Command:Parameters:Code: Select all
test -f
Code: Select all
#DEL_DIR##DEL_FILE# && rm -f #DEL_DIR##DEL_FILE# && rm -r #DEL_DIR#
Reply=1
Output from command ====>
It is not deleting the file or directory
Come on... I didn't say for you to slavish do exactly what he said but to follow his advice. Beside, that was before you showed that your file was not in the same directory being deleted, which was the assumption under which the previous advice was given. Use some common sense.
Some questions:
Is #DEL_DIR##DEL_FILE# the full path to your file? Yes.
Is #DEL_DIR# the full path to your directory? No.
How do you think this thorny problem can be solved?![Confused :?](./images/smilies/icon_confused.gif)
Some questions:
Is #DEL_DIR##DEL_FILE# the full path to your file? Yes.
Is #DEL_DIR# the full path to your directory? No.
How do you think this thorny problem can be solved?
![Confused :?](./images/smilies/icon_confused.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Chulett sorry, wasnt really concentrating...got it solvedchulett wrote:Come on... I didn't say for you to slavish do exactly what he said but to follow his advice. Beside, that was before you showed that your file was not in the same directory being deleted, which was the assumption under which the previous advice was given. Use some common sense.
Some questions:
Is #DEL_DIR##DEL_FILE# the full path to your file? Yes.
Is #DEL_DIR# the full path to your directory? No.
How do you think this thorny problem can be solved?
thanks