Hi, how can I make the equivalent Del *.* or Del *.txt command execute with the DelFile statement?
It seems that it only accepts paths with precise filename indications, such as [xxx]/abc/123.txt and instead [xxx]/abc/*.txt fails.
Roberto
Hi, how can I make the equivalent Del *.* or Del *.txt command execute with the DelFile statement?
It seems that it only accepts paths with precise filename indications, such as [xxx]/abc/123.txt and instead [xxx]/abc/*.txt fails.
Roberto
Hi Roberto,
You can't.
However, you can pass the del system command directly in 4GL in a string to be executed or via a .bat/.ps1 file if it is too complex
if you are a partner, I strongly suggest you to use the Eclipse template for Sage X3 Studio from this page:
https://www.sagecity.com/us/sage_erp_x3/sage-x3-global/w/ccoe-tools/3012/safe-x3-studio-eclipse---code-templates-and-snippets
Look for the systemCommand template
in any case, the 4GL instruction system is used:
https://online-help.sageerpx3.com/erp/12/technical-online-help/
https://online-help.sageerpx3.com/erp/12/staticpost/system/
Example extracted from the online help above:
# Copy FILE1 to FILE2 with stderr redirection on UNIX
System "cp "+FILE1+" "+FILE2-"2>/dev/null"
# List of a directory on a Windows server on which the first reference folder is located
# Returns the list of files and the number of lines read
# If no directory is given we default it with a temporary directory
Subprog DIRECTORY_LIST(FILES,DIRECTORY,NUMBER)
Variable Char FILES(100)(1..)
Value Char DIRECTORY(100)
If DIRECTORY="" : DIRECTORY = "C:\sage\tmp" : Endif
System FILES = adxmac(1)+"@DIR/b/o:n"+DIRECTORY
NUMBER=stat1
End
don't forget to specify the machine hostname where you want to delete the files.
*Community Hub is the new name for Sage City