albator Posted December 5, 2006 Posted December 5, 2006 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
jcarle Posted December 5, 2006 Posted December 5, 2006 Saving an empty text file in notepad will produce a zero byte file which you can rename to whatever filename you'd like.
albator Posted December 6, 2006 Author Posted December 6, 2006 I know, but how to do it with multiple files ?
DigeratiPrime Posted December 6, 2006 Posted December 6, 2006 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
jftuga Posted December 6, 2006 Posted December 6, 2006 (edited) 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, 2006 by jftuga
velos Posted December 6, 2006 Posted December 6, 2006 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
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