davidfin Posted May 31, 2012 Share Posted May 31, 2012 Im new to autoit and just wondering is it possible to get autoit to compare the names of .png files in one folder with names in column 1 of a csv file and move them into other folders via data in column 2. Example: "personsname.png" is in folder called "c:\allpics" all 900+ of them I have a csv file with 2 columns populated, column 1 is the same name as the personsname.png and column 2 is the folder i want them moved to e.g. 8x,8y.8z. So the script would run compare the name of the .png to column 1 and move it to the corresponding folder name of cloumn 2. hope you can help. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 31, 2012 Moderators Share Posted May 31, 2012 davidfin,Welcome to the AutoIt forum. AutoIt can do what you want very simply. You will need to get the data from the csv file into an array (_FileReadToArray will do this) and then get the png files into another array (here you would use _FileListToArray). Once you have the 2 arrays, you then loop through the list of files (use For...Next here) and look for each one in the csv array (_ArraySearch is the command to use) - when you find a match you extract the folder data from the same element and then use FileMove to move the file.Give it a go and see how you get on - you know where we are if you run into difficulties. 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