|
Answer» Hello, I have an issue making my batch PROGRAM, I'm using the command rar to compress a file and this .BAT file is executed everyday automaticly. I WANT to know how can I put the information prompted when I execute the command date/T like the file name before it be compressed..
Thanks and Please SORRY my English, It isn't my root language...I'm not exactly sure what you're wanting unfortunately, I'm sure it's a language barrier issue. Maybe you could explain it a different way or give an example of what you want?What OS are you running? If Windows 2000 / XP / 2003 / Vista, you can do something like: Code: [Select]@echo off setlocal set /p filename=Enter the file name: rar.exe a "%filename%" compressed.rar In this example, the word between the "set /p" and the "=" is your variable. It will be set with whatever you type in at the prompt when the batch file is run. You can then access the variable later in your batch file.
Is that what you were looking for?Thanks for your help, but I find a better and easy way to MAKE it, I use the rar compressor switch like this:
rar a "prefix of the filename (not necesary)" -agYYYYMMDD ".zip (The extension of file)" file to compress.xls
I hope it be useful to another user...
|