cancel
Showing results for 
Search instead for 
Did you mean: 

Command to delete .TXT file from Share

Former Member
0 Kudos

Hi,

I have written below command to delete .TXT file from share.

EXEC ('cmd','DEL \\ustcf001\dev\abc.txt',8);

Command executed successfully but file is not being deleted from share.

Could you please give me correct syntax.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

former_member187605
Active Contributor
0 Kudos

What's the return value of the function call? print(EXEC ('cmd','DEL \\ustcf001\dev\abc.txt',8));

If the DS install user does not have the necessary privileges, the file isn't deleted.

Former Member
0 Kudos

Hi,

Return Value is 1: The system can not find the path specified.

But I have mentioned the path which I have used while creating Flat File.

print(exec('cmd','DEL \\USTSCF001\Interfaces\ABC.TXT',8));

Regards.

former_member187605
Active Contributor
0 Kudos

But you've create folder and file using a different account. The DS user does not have access.

Answers (0)