Jump to content

Show content of a folder


Recommended Posts

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.

The file is uploaded

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?

Please, please help me!!!!

Link to comment
Share on other sites

  • Moderators

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.

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.

Link to comment
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.

Link to comment
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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Moderators

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

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.

Link to comment
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! :-)

Link to comment
Share on other sites

  • Moderators

For $i = 1 To Ubound($FileList) - 1
    MsgBox(64, 'Information On List Of Files','File ' & $i & ' is:' & @CR & 'C:\programme\text\' & $FileList[$i])
Next

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.

Link to comment
Share on other sites

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 :D

Edited by Briegel
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...