nyinyara Posted January 25, 2013 Share Posted January 25, 2013 Hi Guys, I need a little help. I need a script which overwrite all .xyz (example) files in a specified directory. Example: C:/A/1.xyz C:/A/2.xyz C:/A/3.xyz I have to overwrite them with 4.xyz but must keep the original file name. I don't mean EXE files I mean specified extension for an app. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 25, 2013 Moderators Share Posted January 25, 2013 nyinyara,That is as clear as mud to me. If you try to rename all the files to 4.xyz then Windows will throw a hissy fit and refuse as you will have similarly named files in the same folder. And where do you save the original filename? To get you started _FileListToArray and FileMove (which you use to rename files) might be good places to start looking in the Help file. 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...
nyinyara Posted January 25, 2013 Author Share Posted January 25, 2013 (edited) C:/A/1.xyz C:/A/2.xyz C:/A/3.xyz and have content a 4.xyz have content b I must copy 4.xyz's content to the 1,2,3 but must keep the file name. Edit: i don't know the filenames exactly, it must detect all .xyz files in the C:/A/ dir Edited January 25, 2013 by nyinyara Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 25, 2013 Moderators Share Posted January 25, 2013 nyinyara, Much clearer! Then the 2 functions I mentioned above will help you do this very easily. Give it go yourself and come back if you get stuck. 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...
nyinyara Posted January 25, 2013 Author Share Posted January 25, 2013 thanks, check out now 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