Duplicate content of one file to many files

Advanced Renamer forum
#1 : 14/07-13 22:38
Saxtus
Saxtus
Posts: 3
First of all, thank you for this great program!

I am using XBMC and I am trying to create media stub placeholder files (.disc), that contain the same message (for example "Disk 31") for many entries.

For XBMC media stubs to work as I want, both files are needed. One should have information about the original file (.nfo file, those are created automatically on XBMC library export) and the other containing the location (.disc file, containing message with disc number in my case, those needed to be created manually) of where the file is stored offline.

So, I was wondering if it's possible to copy the contents of one source text file to different new files, maintaining the same contents, with filenames created using list and replace methods of AR.

Thanks in advance!


14/07-13 22:38 - edited 14/07-13 22:40
#2 : 16/07-13 20:27
Kim Jensen
Kim Jensen
Administrator
Posts: 772
Reply to #1:
With Advanced Renamer you cannot change the content of a file. You can copy files but you can only copy one file exactly one time in one batch. I am not 100% sure I understand what you want to do but I don't think you can use Advanced Renamer for it.


16/07-13 20:27
#3 : 17/07-13 10:18
Saxtus
Saxtus
Posts: 3
Reply to #2:

I don't want to alter the contents of a file.
Instead of renaming, I am looking to copy the contents of one file, as multiple files with different names, using the methods system of AR.


17/07-13 10:18
#4 : 20/08-13 13:53
GYM
GYM
Posts: 1
Reply to #1:

@rem:
@rem: Copy the contents of one source text file to different new files ( 0_ ... 9_ ) 10x.
@rem: A long directory and file name (if not DOS short name format) must be enclosed in quotation marks.
@rem:
@rem: mix10x.bat "source file directry path with backslash" "source file name with extension"
@rem: mix10x.bat "d:\" "source.txt"
@rem:
@rem: Save this command line as mix10x.bat file and enjoy it :D.

for %%t in (0 1 2 3 4 5 6 7 8 9) do copy %1%2 %1%%t_%2


@rem:
@rem: Copy the contents of one source text file to different new files ( 00_ ... 99_ ) 100x.
@rem: A long directory and file name (if not DOS short name format) must be enclosed in quotation marks.
@rem:
@rem: mix100x.bat "source file directry path with backslash" "source file name with extension"
@rem: mix100x.bat "d:\" "source.txt"
@rem:
@rem: Save this command line as mix100x.bat file and enjoy it :D.

for %%x in (0 1 2 3 4 5 6 7 8 9) do for %%t in (0 1 2 3 4 5 6 7 8 9) do copy %1%2 %1%%x%%t_%2



20/08-13 13:53 - edited 20/08-13 13:55
#5 : 21/08-13 22:23
Saxtus
Saxtus
Posts: 3
Reply to #4:

Thank you for that, but I've already created my own .bat file, just wanted to avoid creating it :)

discstab.lst has the filenames
discstab.txt has the contents of the generated file

discstab.bat (just one line):

for /f "delims=" %%i in (discstab.lst) do copy "discstab.txt" "%%i.disc"


21/08-13 22:23