FireFox Posted June 6, 2013 Posted June 6, 2013 (edited) How do I do batch processing of all files in that folder (do loop)?A loop would require to loop for something (here files)Why complicate things further and arrays?You trapped yourself.If I understand correctly: your program creates files, you don't know their name.Method with _FileListToArray:1. List the files into an array2. Loop through files (array) and process themBr, FireFox. Edited June 6, 2013 by FireFox
RuslikYasha Posted June 6, 2013 Author Posted June 6, 2013 My script (post#5) converts the 1st file from folder"1" to the folder "2", closes the conversion program (hdtv2mpeg), and removes the 1st file from folder"1" to the trash. The script that I already have, but it works for the one file. And I need to make it work as long as all the files in the folder"1" will not be removed. Here arrays are not needed. Need a script (2), which will run my script as needed times, rather than one..
FireFox Posted June 6, 2013 Posted June 6, 2013 (edited) Seems so simple that I doubt about the following exampleWhile 1 ;your script If ... Then ExitLoop WEndConsider the exit loop condition which is no more files to convert.Br, FireFox. Edited June 6, 2013 by FireFox
RuslikYasha Posted June 6, 2013 Author Posted June 6, 2013 It working: Dim $count = 0 Do Run("C:WINDOWSEXPLORER.EXE /n,/e,L:FINAL CUTFCPcapture1") WinWaitActive("") Send("{RIGHT}{LEFT}{ENTER}") WinWaitActive("HDTVtoMPEG2", "",5) Send("{TAB 8}{ENTER}") WinWaitActive("HDTVtoMPEG2", "",5) Send("{ALTDOWN}{F4}{ALTUP}") #WinClose ("HDTVtoMPEG2" [, "text"] ) WinWaitActive("EXPLORER", "",2) Send("{DELETE}") WinWaitActive("EXPLORER", "",2) Send("{SPACE}") WinWaitActive("EXPLORER", "",2) Send("{CTRLDOWN}w{CTRLUP}") ;This is the end of the loop, we have to keep count so the 'do' function knows when to stop! $count += 1 Until $count = 150
Moderators Melba23 Posted June 6, 2013 Moderators Posted June 6, 2013 RuslikYasha, It workingBut "it working" badly. Why not find out how many files you have in the folder first? You can use DirGetSize to do that - then you need only run the loop as many times as needed. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
FireFox Posted June 6, 2013 Posted June 6, 2013 (edited) And if you know when to stop with a number, better use a For statement. "It working better ;)" Also, please use autoit code tags to post your code Edited June 6, 2013 by FireFox
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now