As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at email@example.com and provide your corporate email address, company, and name.
I have the above mentioned files in the path that i have used in the properties and I just built a pflow which includes this FILE(FileOperations)object and ran in the designer, It runs successfully,but it didn't delete the files.
-SET &APP = 'baseapp';
APP FI DELPROC DISK delproc.fex
APP QUERY &APP HOLD
TABLE FILE FOCAPPQ
PRINT COMPUTE APPDEL/A200 = 'APP DELETEFILE &APP "' | GETTOK(FILENAME,70,1,'.',70,'A70') || '" TXT';
WHERE FILENAME LIKE '%z.txt'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS DELPROC FORMAT ALPHA
-IF &RECORDS EQ 0 THEN GOTO DONE;
Change the &APP to the one of your choice. This is not OS specific and avoids explicit looping commands such as -REPEAT. Use the WHERE statement to select files for deletion. You can comment out the ON TABLE HOLD line to see the code being generated. Handle with care, you wouldn't want to accidentally wipe out a bunch of files.
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010
Hi, Silly question really, but can you issue the command 'del D:\XX_Gopal\GK\FilesDelete\File3.txt' from your command line? I'm thinking either you're not on windows, so DEL isn't the correct keyword for deleting files, or maybe it's a permissions problem? Can you try running your pflow from a listener/channel in iSM? I've seen plenty of differences between that and test running in designer in the past...