Welcome! Log In Create A New Profile

Advanced

Please, give me "For All sFileName"

Posted by Ola 
Ola
Please, give me "For All sFileName"
April 16, 2017 11:59AM
Hi all,

It is possible to pass the filename as a variable to many WX file handling commands, but not to "For All". Having this possibility would make it possible to make very generic procedures.

I wonder why this is not possible? Maybe it is too difficult for PCsoft to do?

Best regards
Ola
Al
Re: Please, give me "For All sFileName"
April 16, 2017 02:29PM
Hello Ola

Can you give a specific example of what you are trying to achieve please.

The standard method is to extract a directory list into a string and then work through the string using fExtractPath() to breakout the file name and other pieces.

LFileName is string
LFileList = fListFile(LSrchDir,frRecursive)
// For each file found
FOR EACH STRING LFileName OF LFileList SEPARATED BY CR


Regards
Al
Ola
Re: Please, give me "For All sFileName"
July 18, 2017 09:54PM
Hi Al,

Sorry, I didn't notice your msg earlier.

I'm trying to achieve something like this:

sFile is string = "SOItem" //= Sales order items file 
                       //could also be WOItem = Work order items file etc...

FOR ALL sFile
{sFile + "." + "PRICE",inditem} += 100.00
HModify(sFile)

Best regards
Ola
Al
Re: Please, give me "For All sFileName"
July 18, 2017 10:25PM
Hello Ola

I think this syntax will work
{sFile ,indfile} + ".PRICE" += 100.00

Regards
Al
Ola
Re: Please, give me "For All sFileName"
July 19, 2017 06:56PM
Hi Al,

{sFile + "." + "PRICE",inditem} += 100.00 works all right, but

FOR ALL sFile does not, and that is my point here. Neither does

FOR ALL {sFile,indfile}, which also fails.

A variable simply cannot be used as the filename in FOR ALL filename.
Or, if it can, I don't know how.

Best regards
Ola
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: