Batch duplicate one to multiple files with specific file name at once - windows

I have a question copy files with batch at windows machine.
For example, I have a file named ja.html and duplicate the file to many files with certain file names following:
en.html
zh-ch.html,
ko.html,
id.html
in same directory.
Thanks in advance.

Related

Batch re-name files in multiple directories on MacOS

I have around 500 JSON files sitting in their own directories that I need to re-name.
Every JSON file has the name, "list.json".
So what I need is a batch file operation for MacOS of some sort that will look in all the directories for files matching "list.json" and change the name to match name of the directory the file is sitting in. What kind of script do I need to do this?

Master batch file to scan multiple sub directories for specific file types then executing batch file

Please bear with me here as I am relatively new to batch files.
So far me and my colleague have created a batch file for all of our reports that need to be made and left them in the respective sub folders. What we are struggling with is creating a batch file in the main folder that will scan all of the sub folders(there are thousands) for a specific file type (for reference that file extension is .KI1) and if found it will run the batch file in that sub folder then continue on. I understand this is a massive project but the biggest issue we are currently facing is the function for searching all the sub folders for that file type we have the command for running the batch file.
I was trying to implement anything from: batch file Copy files with certain extensions from multiple directories into one directory
However I was unsuccessful.

mass deletion batch file

I have been tasked with stripping out around 50 thousand .INI files from a windows folder that has 58 thousand files in it the issue is that the files aren't in order and removing these manually would be very time consuming.
The files themselves use number Id's as their naming convention and I managed to get an Excel spreadsheet together with all the ID's I need to remove. My question is, can I put these ID's somewhere like a batch file and get it to remove these if so how?
Thanks in advance.
Here is the simplest script that will work:
cd "C:\directory\location\"
del "*.ini" /s
exit
The first line makes sure its in the directory that all the files are in, the second one deletes all the files in the specified folder and all of its subfolders (the subfolders can keep their .ini files if you remove the /s), and the third line quits the batch file. The third line is not necessary. The first line can be revoked if the batch file (.bat) is in the same folder as all of the .ini files.

scan zip files and move files to another directory using a batch file from the command line on windows

I am working on a batch file and trying to write the correct windows commands.
1) Command-line from Windows
2) Use commands to scan the zip file so that it will look inside of the zip file for a specific string in the file within the zip file.
3) If the scan finds that specific string in the file that is within the zip file then move that zip file to another specified directory.
Is it possible using dos commands within a batch file?
I want to learn more on this. Anyone have any guidance or suggestions?

SQL Loader: writing batch file (windows) for processing multiple data file

I want to process all the .CSV in files (data files) in specific folder. My problem is how can i pass this file name to sql loader as every time it would be different file name.
I want to have all this stuff in single batch file so that i can schedule it whenever i wish.
Can anyone help me out pls?
Thanks in advance....
Mehul
Assuming for each .csv file there is a corresponding .ctl (control file) the following should work:
for %%i in (*.csv) do (
sqlldr data=%%i control=%%~ni.ctl log=%%~ni.log
)
This assumes the files are in the current directory. You might want to add the approriate cd commands before iterating over the input files.

Resources