AXPPES Posted December 3, 2012 Share Posted December 3, 2012 Hello Guys,I need help creating something that could update more than 10000 files inside a folder... I need the following:I have several files with diferente names but that ende with *.rcf (opens eith notepad) inside I have:[Main]SendStatusFile=YESLog=YESIniFile=*.INI[Host]HostName=200.99.137.234I need to delete de following line:IniFile=*.INI (* This as several names)In all files.....Do you know how to do it?Thanks Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 3, 2012 Moderators Share Posted December 3, 2012 AXPPES,Use _FileListToArray to get a list of the .rcf files in the folder. Then loop through the list and use _FileReadToArray to get the contents into an array. Loop through that array and remove the line you want with _ArrayDelete. Finally use _FileWriteFromArray to rewrite the file. Give it a go yourself - you know where we are if you need a hand. 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...
AXPPES Posted December 3, 2012 Author Share Posted December 3, 2012 Just one question.....the folder as other folders....does this comands work inside the subfolders or do I have to do it one folder by folder? Thanks for the help Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 3, 2012 Moderators Share Posted December 3, 2012 AXPPES,If you want to look in subfolders as well then use my RecFileListToArray UDF to list all the files - look in my sig for the link. 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...
AXPPES Posted December 3, 2012 Author Share Posted December 3, 2012 AXPPES,If you want to look in subfolders as well then use my RecFileListToArray UDF to list all the files - look in my sig for the link. M23Sorry...I am very new at this?Where should I look?thanks, Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 3, 2012 Moderators Share Posted December 3, 2012 AXPPES,There is a list of my UDFs at the bottom of my post. Click on the red RecFileListToArray in that list and you are linked to the thread which deals with the UDF. You can then download the zip file and use the UDF - just put it into the same folder as your script. If you want it to available to all your scripts in the same way as the normal AutoIt UDFs, then the Adding UDFs to AutoIt and SciTE tutorial in the Wiki tells you how to proceed. 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