GetFileList returns different values Windows 2000 and 2003

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
tony_smith
Pro Scripter
Posts: 70
Joined: Wed May 14, 2003 8:25 pm
Location: Vancouver BC Canada

GetFileList returns different values Windows 2000 and 2003

Post by tony_smith » Tue May 11, 2004 3:51 pm

The following script returns different data when run on Win2000 Server and Win2003 Server. The GFL command returns sub-folders in Win2003, which I don't want. The DOS command "DIR *.*" produces the same results in each O/S.
Is there a work-around for Win2003?
Are there other differences in MSched commands in Win2003?

Let>files=U:\EData\SCN_FTP\THDC\Ansi\810\4060\
Let>TP=%files%*.*
messagemodal>TP
GetFileList>TP,files
Del>U:\Reports\TPPC_Files\test.txt
WriteLn>U:\Reports\TPPC_Files\test.txt,result,%files%
Separate>files,;,file_names
Del>U:\Reports\TPPC_Files\test2.txt
Let>LFILE=U:\Reports\TPPC_Files\test2.txt
Label>BEGWRTLN
Let>k=0
Repeat>k
Let>k=k+1
FileSize>file_names_%k%,size
FileDate>file_names_%k%,date
WriteLn>LFILE,result,file_names_%k%
WriteLn>LFILE,Size: %size% Date: %date%
WriteLn>LFILE,
Until>k,file_names_count

I am testing for the existance of files. In each case here, the folder is empty (No files). The sub folder "ARCHIVE" contains many files (Which I don't care about in this application) but they are not found, despite the GFL command returning the sub-folder.

Win2000 results;
Test.txt contains a nul string... nothing to report
Test2.txt contains...
Size: File Not Found Date: File Not Found
... which I am used to seeing in my report.

Win2003 results;
Test.txt contains the string ...
U:\EData\SCN_FTP\THDC\Ansi\810\4060\ARCHIVE;U:\EData\SCN_FTP\THDC\Ansi\810\4060\..;U:\EData\SCN_FTP\THDC\Ansi\810\4060\.
Test2.txt contains the strings...
U:\EData\SCN_FTP\THDC\Ansi\810\4060\ARCHIVE
Size: 0 Date: File Not Found

U:\EData\SCN_FTP\THDC\Ansi\810\4060\..
Size: 0 Date: File Not Found

U:\EData\SCN_FTP\THDC\Ansi\810\4060\.
Size: 0 Date: File Not Found

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts