I was using GetFilelist and was having issues so I changed it to a dos command. As seen below.
RunProgram>cmd /c dir "%foldertobeprocessed%\*.*" /b > "C:\barcodeseparator\Filelist.txt"
It was not a GetFilelist issue. The script works fine on a local PC or a local network with a UNC path or on a Mapped Drive. However it will not work on a WAN.
However, when the Dos Command is run manually (typed at the prompt) it works (provides the file list).
I continued testing with a directory command.
I tested it with a basic dir z:\*.* and sent it to a file, the first two lines are in the text file but that is it. The line saying
"Directory of z:\"
is not there. The only lines in the file are the first two that contain Volume in drive and Volume Serial Number
Any ideas as to what could cause this.
Cause for failure to get directory and file
Moderators: JRL, Dorian (MJT support)
I don't have an idea as to the problem. But one way to possibly diagnose the issue would be to change the Dos cmd line from /c to /k and then run it as a test. /k will leave the Dos window open so you can read any error messages.
RunProgram>cmd /k dir "%foldertobeprocessed%\*.*" /b > "C:\barcodeseparator\Filelist.txt"
RunProgram>cmd /k dir "%foldertobeprocessed%\*.*" /b > "C:\barcodeseparator\Filelist.txt"
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Just a few random thoughts....
1. Is the Z drive a compatible format for the DOS DIR command?
2. What if you use Net Use Z: ............ before the DIR command?
3. What was problem/symptom with GetFileList? What was the Result?
1. Is the Z drive a compatible format for the DOS DIR command?
2. What if you use Net Use Z: ............ before the DIR command?
3. What was problem/symptom with GetFileList? What was the Result?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
dir command
Yes it is compatible, I believe it is in my logic. After more testing it is seems to be running when there is a subdirectory present, so it is just not getting the root directory.
So, what I am going to do is continue with the Dos Command (it does work when it is manually entered and viewed) and then write a line in the output containing the root directory.
When this is done I will check for files in the root.
So, what I am going to do is continue with the Dos Command (it does work when it is manually entered and viewed) and then write a line in the output containing the root directory.
When this is done I will check for files in the root.