how to transform a text in code?

-----( this application writes the name of the directory that should be done to find)-----------------------

Table2.AddCol(cString,"Column1",145)
Table2.Cell("Column1",1) = "AppPath&"&Chr(34)&"\sysdata\"&Chr(34)
Table2.SaveCSV ("c:\mytable.csv", "," ,False)

________________________________

------(another application that reads the directory that should be done to find and list the files.)-------------

Table2.LoadCSV ("c:\mytable.csv", ",", false, true)
myvaluedir = Table2.Cell ("Column1",1)
FileSearch ( mylist , myvaluedir , "*.*")
_______________________________________________


The problem is that the variable "myvaluedir" is read as text, not in code.
myvaluedir is : AppPath&"\sysdata\"

the error message is:-> illegal characters in path in FileSearch

__________________________________

if I write manually
FileSearch ( mylist , AppPath&"\sysdata\" , "*.*")
at the end it displays correctly
 
Please help me

the first application this ok , he must write exactly AppPath to know that the other application is to view their own location.
if I write AppPath&"\sysdata\" he will write the directory location of the first application.
1 - the first application saves a document with information on which folder the files are. (Local or c: \ xxx)
2 - The second application is taken to another folder along with the text(CSV)
3 - the second application is open and read the text(CSV) whether it is to do a search in this folder that he, or in c: \ xxx
----------------------------------------------
the script error in the second application, which does not read the text received with code(script), he gets it right and writing:

AppPath & "\ sysData \", the more he does not run as code.
-------------
how to convert the text AppPath & "\ sysData \" from a text loaded by LoadCSV, in script executed by basic4ppc ?
 

klaus

Expert
Licensed User
Longtime User
Sorry, I don't really understand the problem you still have.
So I just made a small example with the code lines of your first post that saves the csv file, reloads it and makes a Filesearch.

If this is not what you need please can you upload your code so we can see what your problem is.

Best regards.
 
already appreciate your effort.

already appreciate your effort.

I received the file you sent, plus the only problem is:

-in file mytable.csv, can not be written -> c:\local\TableFileName\sysData\

-should be written only-> AppPath &"\sysData\"

Because I will take your application to another folder with the information already recorded.
as I explained, will always get the same folder, even if I trasporti to another location.
 

klaus

Expert
Licensed User
Longtime User
Here you have 3 possibilities:
1) the program doesn't save the AppPath and doesn't show it either
2) the program doesn't save the AppPAth but shows it
2) you can enter for example "AppPath\system\" and the program tests if the beginning of the text is AppPath it replaces AppPath by it's value otherwise it keeps the cell content.

Best regards.
 
Top