TheIceman Posted May 5, 2010 Share Posted May 5, 2010 (edited) Hey, As a newbie in scripting without any programming xperience i need some help here from some scrip-wizards. I would like to run a script which allows me to search a physical drive recursivly(all partitions) for a pre-created group of file-extensions(need 3 different groups). Then i want to copy those found files to a directory i can choose manually. And if the file allready exists in that directory, i want the script to rename the duplicate file numbering the name up. Ex. Search harddisk A (has partions 1,2) for pre-created group alfa (containing extensions .bat, .cmd, .ini) Found on harddisk A partition 1 files autoexec.bat, test.cmd, desktop.ini and on partition 2 the file test.cmd The result in my target chosen folder should be autoexec.bat, test.cmd, test01.cmd and desktop.ini Hope this was explained well. Searched the forums allready but couldn't find anything about searching a physical drive, so i'm stuck at the beginning. Noob in need ;-) Iceman Edited May 5, 2010 by TheIceman Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 5, 2010 Moderators Share Posted May 5, 2010 TheIceman,When you post here it always helps if you have had a go at solving your problems beforehand. Having some code to work on is a great help - and no-one here is too keen to help the "code it for me" brigade. 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. 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 the excellent tutorials that you will find here and here - you will find other tutorials in the Wiki (the link is at the top of the page). There are even video tutorials on YouTube if you prefer watching to reading.Here are some pointers to get you looking in the right direction: - You can get an array of the available drives by using DriveGetDrive.- If you search "+recursive +file +search" you will find lots of scripts for searching an entire drive - many of them enable you to specify the file extensions you want to include.- Once you have found the files with the extensions you require, you can check if one of your groups exists among them using _ArraySearch.- You can choose a folder with FileSelectFolder.- You can copy the files with FileCopy - renaming any preexisting ones can be done with FileMove.That should give you a start. Have a go at coding something yourself. You know where we are when you run into problems. 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...
TheIceman Posted May 5, 2010 Author Share Posted May 5, 2010 Melba, I don't expect you guys to do it for me. The way that you're pointing me in is better so i can learn and understand the scripting way. Will post my findings and when i'm stuck again. Thnx for the fish Iceman 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