set a variable from the keyboard, truncate it

July 23, 2010 at 15:26:49
Specs: Windows 7
I have a super simple question re batch files for Win-7. I need to set
a variable from the keyboard, truncate it, insert the truncated
variable into a path to a file so I can copy to it.

Example: I want to type a job no. "1234" and have the script keep the
"12", trash the "34", then add the "12" to "JOBS" to get "JOBS12", and
then insert it into a path such as C:\user\me\files\JOBS12\*.

The end result is to type "nnNN" into the computer and have it backup
file folder "nnNN" in folder "JOBSnn" on three different hard drives
where nnNN could be any 4 digit number.


Please let me know how we can do this.


See More: set a variable from the keyboard, truncate it

Report •


#1
July 23, 2010 at 15:31:46
Whatever program you would design would have to have a on and off key so it wasn't capturing everything you typed.

I will move this to the programming forum in the hopes of providing you with a better answer.

*accept I am not a forum pro in the
windows 7 forum. Moderator please move to programming. Thanks


Report •
Related Solutions


Ask Question