Followers 0

Show content of a folder

10 posts in this topic

Hi, I haven a new problem.

I postet a view days ago, that I want to show the content of a folder.

The answer of this was write this:

#Include <File.au3>

#Include <Array.au3>

$FileList=_FileListToArray("C:\Programme", "*.*", 0) ; change the 0 to 1 or 2 for only Files/Folders If (Not IsArray($FileList)) and (@Error=1) Then

MsgBox (0,"","No Folders Found.")

Exit

EndIf

_ArrayDisplay($FileList,"$FileList")

This works, but it is shown in a listbox.

My problem is now:

I want to use the content of this folder, to copy each file to the internet.

In a folder "C:\income" are several files like:

"123.txt", "1223.txt", "3445.txt" a.s.o.

I need a programm that can read this data and put them one after another in a description field like this:

First:

ths programm should know, that 123.txt is the first, that have to be uploaded.

The name 123.txt should be written in the description box than the progress with the upload begin.

Second:

The programm should know, that 1223.txt is the second, that have to be upload

...

The programm should know, when it has to finish this.

I don't know how to do?

Share on other sites

LOL, post and sign off, classic.... For the upload look at the FTP.au3 information in the Scripts and Scraps forum... But, if your having an issue with figuring out which file is which (simple array could fix that), then FTP will be an issue for you too.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share on other sites

Do you know the websites, where you can upload something.

You have a field, where you can write the path of a file in it.

And this should be done a lot of time. So far, that all the files in the origin folder is uploaded to a server.

This is not something like a ftp-client.

Share on other sites

Your filenames are in the array '$FileList'. To finish the programm you can use '$FileList[0]'. That's number of filenames. With '_ArraySort' you can sort your filenames. Try first to copy the files local. Then try FTP. If your script is faillingt post it.

good luck

Share on other sites

#5 ·  Posted (edited)

I think my problem is:

I don't know how to describe autoit, that I have a list of files, and that I want have a file from this list to work with the filename, that I can write this filename into the field, where the website wants to have to directory of the file.

I don't know, if you know, what I mean.

Edited by Seth27

Share on other sites

#6 ·  Posted (edited)

I think my problem is:

I don't know how to describe autoit, that I have a list of files, and that I want have a file from this list to work with the filename, that I can write this filename into the field, where the website wants to have to directory of the file.

I don't know, if you know, what I mean.

$FileList = FileListToArray() ...$FileList has your list... So if you go through them 1 by one, you would see it's already there:

For $i = 1 To Ubound($FileList) - 1
MsgBox(64, 'Information On List Of Files','File ' & $i & ' is:' & @CR &$FileList[$i]) Next Edit: So you would replace the MsgBox() with any command to send the files ($FileList[$i] that is). Edited by SmOke_N [center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center] Share this post Link to post Share on other sites Thank you very very very much!!!!!!!!!! I have another question! :-) But I think you know. In the messagebox, you have with the actual script only the name of the file. Do you know, how you can show the whole path like "C:\programme\text\hallo.txt" ? Thank you! The next time, I have to spend a beer! :-) Share this post Link to post Share on other sites For$i = 1 To Ubound($FileList) - 1 MsgBox(64, 'Information On List Of Files','File ' &$i & ' is:' & @CR & 'C:\programme\text\' & $FileList[$i])
Next

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share on other sites

#9 ·  Posted (edited)

I think you know the path.

\$FileList=_FileListToArray("C:\Programme", "*.*", 0)oÝ÷ Ø-=Øúè¶¦å¡jÖ¢ëZºÚ"µÍÜ ÌÍÚHHHÈXÝ[
ÌÍÑ[SÝ
HHBÙÐÞ
ÌÎNÒ[ÜX][ÛÛÝÙ[ÉÌÎNË ÌÎNÑ[H   ÌÎNÈ [È ÌÍÚH [È ÌÎNÈÎÌÎNÈ    [ÈÔ   [È ÌÎNÐÎÌLÔÙÜ[[YIÌLÉÌÎNÈ  [È ÌÍÑ[SÝÉÌÍÚWJB^

EDIT: SmOke_N you beat me, I need to long to write in english

Edited by Briegel

Share on other sites

Ah okay, I think that's okay.

I am very grateful.

Thank you!!!!!