This forum is moving.

We appreciate your contribution to one of our largest educational forums. Thanks to your participation, we have expanded our vision to create the new Wolfram Community, which will bring together members of our entire global family. With the launch of the new Wolfram Community, the Wolfram Faculty Program Forum will be retired on August 6, 2013.

We encourage all members of the Wolfram Faculty Program Forum to join Wolfram Community. Sign in with your Wolfram ID at http://community.wolfram.com to get started.

Wolfram Community features discussion groups for all Wolfram products as well as topic-based groups like education, chemistry, and geometry.

And don't worry: all discussions on the Faculty Forum will be preserved for reference. We're simply switching this site over to read-only mode as we work to bring the entire Wolfram Community together for learning, sharing, and collaborating.

Forum Rules
By using the Wolfram Faculty Program Forum, you agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, or sexually oriented material. Wolfram Faculty Program Forum administrators have the right to remove, edit, move or close any topic at any time should we see fit.

Personal Information: Posts in this forum may be viewed by non-members; however, the forum prohibits non-members from viewing your profile. Although your email address is hidden from both non-members and members, your account is initially configured to allow members to contact you via email through the forum. If you wish to hide your profile, or prohibit others from contacting you directly, you may change these settings by updating your profile through the User Control Panel.

Attachments: Attachments are not currently enabled on this forum. To share a file with others on this site, simply upload your file to the online storage service of your choice and include a link to the file within your post. If your school does not offer an online file storage and sharing service, the following sites provide free basic online file storage and sharing: Mozy, FilesAnywhere, Adrive, and KeepandShare.

I'm creating CDF quizzes and assignments for my students. Because CDF does not permit exporting of data, I will have them copy their answers from a text cell and then use a web form or FTP client to upload the data to my server, which is a Mac at my office at work. I then want to use Mathematica to access and download those submissions from the Mac in my other office.

I know how to use Import with FTP to import a single file on my remote Mac, but how can I get a listing of all files in a folder on that Mac? I have tried

FileNames["*", dataFilePath]

where

dataFilePath is "user:password@computerAddress//Documents/FolderName/"

but, of course, FileName[...] does not make a connection, so it does not return anything.

Excluding the CDF part for a minute, if there is a folder of files which you'd like to import and make a nested list in your machine, I'd suggest something like the following (which is taken out of an application I wrote):

This is similar to what you have below, so I think you are on the right track. In my example above, you can test the import of a single file first with no full file path to make sure the connection and path work, then build the loop based on finding all the file names in that particular folder. That should help you test the major steps to see what isn't working.

We're also starting to talk to people about special agreements to create custom-signed CDF documents. There are now options to give your students CDF documents that would export information from the CDF document which isn't possible with FreeCDF. It seems like this would have a couple advantages to you, it would eliminate the cut-and-paste step that you have in mind, and would also eliminate the need to build a web form that students would use just to shuffle information to you. Exporting results as a notebook is also really handy since it can be any sort of string, graphic, special function, or any Mathematica expression - when I'm building applications like this, it always takes a chunk of time to figure out how a string or XLS file is going to change information (change to numeric values and round values, etc) and how I'll need to filter it in Mathematica to check the expressions against correct answers or do some analysis. It's possible to import a notebook file and just peel out the data as a list of expressions.

If that's of interest, let me know, I'll have someone talk to you about this in more detail.

Thank you for the tip. It is exactly what I am looking for, but unfortunately, I get the following error:

"SetDirectory::cdir: Cannot set current directory to..."

which apparently means that Mathematica cannot find or set the directory. However, the file path that I use works fine in my FTP client and other languages that I use. My file path for the remote Mac looks like this.

and got the same error. I'm guessing that Mathematica is not able to send a password like an FTP client does, or perhaps Mathematica uses SFTP by default, whereas I have FTP running on the remote Mac. I cannot keep the submissions in a public folder because there is other confidential information about student accounts. I suppose I could use LiveCode or a CGI to download the submissions to my local hard drive and then use Mathematica to process them, but it would be nice to be able to use Mathematica for all of the steps.

I glossed over the fact that you are using FTP in this case, I don't have a lot of experience with this. I'll have someone get in touch with you to get this question routed to our Technical Support for a more complete answer. I'll also have the person that handles licensing for your campus explain the process of custom-signed CDF files in more detail as well so you know the best ways to share these documents.