I need a script to cycle through folder and copy the folder name and save it in 'temp'. Then within that folder copy a specific file and paste it into another folder with the name 'temp.dat'
For example, take “drivers.dat” folder name, extract “drivers” Then copy ‘drivers.dat’\’dat’ file, move and rename to new_dat\drivers.dat
Thanks for the help.
Lets say the path is network path L:\Personal Folders. Over here 1) Create a “new_dat” folder 2) Cycle through the folders in the directory and: a. Take the folder name, extract the folder name without the .dat extention, save the name b. In that folder copy and rename the dat file to name_dat.dat c. Copy the new dat file to the “new_dat” folder. 3) Repeat for every folder.dat
For example, take “2.5V drivers.dat” folder name, extract “2.5V drivers” Then copy ‘2.5V drivers.dat’\’dat’ file, move and rename to new_dat\2.5 V drivers.dat
We’ll end up with a new_dat folder containing all the “dat” files but renamed as “folder name.dat".