December 5, 200619 yr Hi, does someone know a dos command, script, software that can help me replace a bunch of file in a directory with file with the same name but empty ones ? (zero bytes)Any help appreciated
December 5, 200619 yr Saving an empty text file in notepad will produce a zero byte file which you can rename to whatever filename you'd like.
December 6, 200619 yr I got a messy solution but it will work Use a program like DirLister or LS to export a list of the filenames you need to create empty clones of.Use Excel or any spreadsheet and paste "copy nul" or "type nul >"into a cell and fill it down the column the same number of files you are going to need. Then import that list into the next column. Concatenate and then copy paste that into a bat file. For Example:create_empty_files.batcopy nul name1.extcopy nul name2.extcopy nul name3.extcopy nul name4.extcopy nul name5.ext
December 6, 200619 yr I wrote a program to do just this a long time ago. It uses python, from www.python.org.http://www.fcs.uga.edu/~john/blog/scripts/...e_struct.py.txtI just tested it and it still works, too. -John Edited December 6, 200619 yr by jftuga
December 6, 200619 yr Try this bat fileempty_files.batfor %%f in (*.txt;*.exe) do copy nul "%%f"You can change (*.txt;*.exe) to something else, for example (*.*) if you want this to work for all files
Create an account or sign in to comment