I can't get the GetFileList command to return files names without each file having a backslash "\" in front of it.
I have two files in the directory NEW_OUT; A001.csv and A002.csv. When I run...
Cha>U:\EData\SIL_FTP\Dunn\VMI\NEW_OUT\
GetFileList>*.csv,files
Separate>files,;,file_names
The result of GetFileList is; FILES=\A001.csv;\A002.csv
and...
Separate yields \A001.csv and \A002.csv
I have tried changing file extensions and the separator, but the results do not change.
Can anyone help with this?
T
GetFileList returns backslash
Moderators: JRL, Dorian (MJT support)
- tony_smith
- Pro Scripter
- Posts: 70
- Joined: Wed May 14, 2003 8:25 pm
- Location: Vancouver BC Canada
Tony,
Try using the stringreplace function to remove the backslashes before you do your seperate. Something like this:
Cha>U:\EData\SIL_FTP\Dunn\VMI\NEW_OUT\
GetFileList>*.csv,files
Let>bslash=\
Let>null=
StringReplace>files,%bslash%,%null%,newfiles
Separate>newfiles,;,file_names
Note that there is nothing beyond the equal sign in the "Let>null=" line.
Hope this helps,
Dick
Try using the stringreplace function to remove the backslashes before you do your seperate. Something like this:
Cha>U:\EData\SIL_FTP\Dunn\VMI\NEW_OUT\
GetFileList>*.csv,files
Let>bslash=\
Let>null=
StringReplace>files,%bslash%,%null%,newfiles
Separate>newfiles,;,file_names
Note that there is nothing beyond the equal sign in the "Let>null=" line.
Hope this helps,
Dick
- tony_smith
- Pro Scripter
- Posts: 70
- Joined: Wed May 14, 2003 8:25 pm
- Location: Vancouver BC Canada
I think it is just a result of you changing directory first. If you specify the full path in GetFileList you get the full path to each file which is how it is supposed to work. Maybe an option to return full path OR filename only is called for.
MJT Net Support
[email protected]
[email protected]
- tony_smith
- Pro Scripter
- Posts: 70
- Joined: Wed May 14, 2003 8:25 pm
- Location: Vancouver BC Canada