ftpgetdirlist allways shows the complete folder content

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
matthiasR
Pro Scripter
Posts: 52
Joined: Tue Jan 20, 2004 3:45 pm
Location: Lübbecke, Germany

ftpgetdirlist allways shows the complete folder content

Post by matthiasR » Wed Jun 10, 2009 9:47 am

Hi,

here with MS Pro 11.1.11
the ftpgetdirlist allways shows the complete directory listing, although i defined a file spec.

The following code should list all php-files

Code: Select all

FTPGetDirList>xxxx,user,passwort,21,c:/test.txt,/,*.php,d

but the listing contains the complete folder content.

Am i doing something wrong?

Regards,

Matthias

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed Jun 10, 2009 2:21 pm

There was another similar thread a while ago. Wildcard file selection by extension works (at least on my FTP server) in the older versions, before the Host Directory parameter was added to the command, but I have not seen a solution posted that will make it work in the current version (other than to filter the output file after generation).

(Incidentally the example in the online help for FTPGetDirList> doesn't include the Host_Dir.)

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Too many arguments

Post by gdyvig » Wed Jun 10, 2009 2:30 pm

The user manual shows 6 commas, I count 7.

Gale

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed Jun 10, 2009 2:49 pm

From online help

FTPGetDirList>Server,Username,Password,port,Local_File,Host_Dir,Host_File_Spec,Type

I see 7

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

syntax and example do not agree

Post by gdyvig » Wed Jun 10, 2009 2:57 pm

Hi Me_Again,

You are right, the online help and the manual shows 7 commas.

But the example shows only 6.
Should be corrected.


Other than that, do you see a problem in the syntax used by Mathius?


Gale

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed Jun 10, 2009 3:07 pm

Exactly, that was my comment above, the example is for the command before the host dir parameter was added.

No, I don't see anything wrong with the syntax, it's a replay of this thread.

I do wonder if it would work using the "L" option instead of the "D", or maybe that should be upper case, or maybe you can't ask it to do a wildcard search in multiple directories since I guess / is the root?

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Jun 10, 2009 4:53 pm

I have just tried it (with current v11 syntax) and it works fine - retrieves only filenames of the file type specified (I tried it against a web server folder for .php files and it returned a list of only the .php files - as expected).
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed Jun 10, 2009 5:00 pm

I can't make it work in the current version trial, can you post the line showing the host dir and file spec parameters please?

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Jun 10, 2009 5:28 pm

This is the line I am using (with credentials removed)

FTPGetDirList>server.com,user,pass,21,%SCRIPT_DIR%\ftptest.txt,/httpdocs,*.php,D
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed Jun 10, 2009 6:29 pm

Hmmm, no surprises there :?

Very strange, in 11.1.11e I can't get FTPGetDirList> to work at all on my webserver.

This doesn't work (FTP progress popup shows but no directory downloaded)

FTPGetDirList>myserver.com,myname,mypass,21,c:\temp\ftptest.txt,/web/FILES,*,D

But, copy 'n paste to avoid typos and edited to an FTPPutFile this works fine, so the server info and directories are OK.

FTPPutFile>myserver.com,myname,mypass,21,c:\temp\fdir.txt,/web/FILES,fdir2.txt,A

Copy 'n paste and edited to the old syntax this works fine in 9.1.02

FTPGetDirList>myserver.com,myname,mypass,21,c:\temp\ftptest.txt,/web/FILES/*,D

I'll try it on a different server.

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed Jun 10, 2009 8:40 pm

Me_again wrote:I'll try it on a different server.
I did try a different server and v11 FTPGetDirList> works perfectly on that one :roll:

Strange :(

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