MisterMcJohn Posted May 17, 2013 Share Posted May 17, 2013 first time poster and absolute AutoIt beginner.... please be gentle! I'm trying to write a script to automate the Sox tool to convert a .ul file to .wav en when done delete the .ul file. But this must be done for a whole disk with directory's. So I like todo this with a script or batchfile. So what I do now is the following just for one file: sox -r 8000 -c 1 E:directorydate127call20120629.ul E:directorydate127call20120629.wav So a script that search into all directory's and convert to /wav en delete when ready the .ul file (don't worry, we have a backup) The .wav file must be in the some directory as the original file. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 17, 2013 Moderators Share Posted May 17, 2013 MisterMcJohn, Welcome to the AutoIt forum. What you want to do is not too difficult. You can use my RecFileListToArray UDF - look in my sig for the link - to get an array of all the *.ul files on your disk. You can then use a For...Next loop to work through the array and call your Sox utility using Run for each file, deleting the original using FileDelete once it is converted. Take a look at the UDF and those functions in the Help file and see if you can come up with something. You know where we are if you run into trouble and we will be very ready to offer help to get your script running correctly. 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 Link to comment Share on other sites More sharing options...
MisterMcJohn Posted May 17, 2013 Author Share Posted May 17, 2013 Wow... thats a fast reply... But i'm not a scriptkiddy...hahaha, when looking at your script...no id where to begin? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 17, 2013 Moderators Share Posted May 17, 2013 MisterMcJohn, But i'm not a scriptkiddy And most certainly neither am I - neither in age nor attitude. A question if I may: Do you want to learn how to use AutoIt in general, or are you just looking for a script to do this one particular job? If the former then reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at this excellent tutorial - you will find other, more advanced tutorials in the Wiki (the link is at the top of the page). Then you will get a grasp of the essentials of how to code in AutoIt and what I said above will make more sense and shoudl give you the clues on how to at least start to code something - we will of course be very ready to help refine the result. If the latter then you need to know right now that we do not write scripts on request from scratch. Think of the old saying: "Give a man a fish, you feed him for a day; give a man a net and you feed him forever". We try to be net makers and repairers, not fishmongers. So which is it to be - a piece of cod and chips or some twine and a needle? 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 Link to comment Share on other sites More sharing options...
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