Jump to content

Recommended Posts

Posted

Hello and sorry for my english :)

I wana make program who search all .txt file in chosen hard drive and copy to chosen location

i dont know what function can find txt file in everyone location

Posted

I dont see there any solution for my problem

"I wana make program who search all .txt file in chosen hard drive and copy to chosen location" (don't show that only find and copy)

Posted (edited)

Things to look at in the help file:

For - Next Loop

_FileListToArray

FileCopy

FileSelectFolder

Try to put those things together, and if you have too much trouble then come back, show your code, and you will get a lot more help.

-Spook

Edited by SpookMeister

[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Posted (edited)

I need this same function

@ECHO OFF
MKDIR C:\TXT
FOR /R C:\ %%V IN (*.txt) DO copy "%%V" C:\TXT

In AutoIT

Code for SpookMeister

#Include <File.au3>
#Include <Array.au3>
$FileList=_FileListToArray(@DesktopDir) &  (@UserProfileDir) & (@ProgramsDir) & (@MyDocumentsDir) & (@TempDir) & (@ComSpec) & (@SystemDir)
$sFilter = ".txt"
$sPath   = ".txt"
If @Error=1 Then
    MsgBox (0,"","No Files\Folders Found.")
    Exit
EndIf

$aaa = _ArrayDisplay($FileList,"$FileList")

$xxx = FileSelectFolder($aaa, "")

DirCreate("C:\All txt file")
FileCopy($xxx.txt, "C:\All txt file")

but dont work

Edited by Quzziy

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
×
×
  • Create New...