|
Answer» Hello!
Simple 'LOG' .bat file:
Code: [Select]@echo off color A3 echo @echo off >>T.bat echo echo Hi >>T.bat echo echo This is a test >>T.bat echo pause >>T.bat echo EXIT >>T.bat pause exit So it makes a batch file that says Hi This is a test
But, can you MAKE a log using >> that makes a folder, and when it creates that folder, make a file IN it?
Thanks...
BR
EDIT: I have it to make a file, then that file makes a directory, then the file moves itself into the directory. Is there a way that it duplicates the file, THEN moves it to a dir?You would just add this
Code: [Select]echo echo mkdir folder >> T.bat call T.bat move file folder
That will create a folder command in the batch file. Then it calls that batch file (which will create the folder), then it will go BACK to this and move the file into the folder. Quote from: BatchFileCommand on January 29, 2009, 06:24:30 AM You would just add this
Code: [Select]echo echo mkdir folder >> T.bat call T.bat move file folder
That will create a folder command in the batch file. Then it calls that batch file (which will create the folder), then it will go back to this and move the file into the folder.
This only does make a file, T.bat, then doesn't make a folder, and, it doesn't call it.
EDIT: Now, it makes the T.bat and then it makes a folder, folder, and then it moves T.bat inside the folder.
Code: [Select]@echo off echo mkdir folder >> T.bat call T.bat move T.bat folderOh, I assumed you knew to put the name of the file where I put file.
|