Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.
Create batch file prompt
Name: remgu Date: May 3, 2007 at 07:53:30 Pacific OS: Windows XP SP2 CPU/Ram: P4 3.4Ghz 1GB Ram Product: Clone
Comment:
Mechanix2Go has been kind enough to provide the following syntax.
Does anyone know what syntax needs to be added so that the .prt file below is prompted for? The filename is the only thing that is not constant so right now one has to open the .bat file and manually change the file name and then execute the file.
::== @echo off
cd c:\ftp_temp
> my.ftp echo o 192.168.1.1 >> my.ftp echo johndoe >> my.ftp echo password >> my.ftp echo bin >> my.ftp echo cd audit_dumps >> my.ftp echo get file001.prt >> my.ftp echo bye
@echo off :LOOP Set /P prtfile=Enter .prt file name (without ext)^> Echo File name is %prtfile% Set /P answ=Enter Y to proceed or you are prompted again^> If /I not "%answ%."=="Y." GoTo :LOOP cd c:\ftp_temp
> my.ftp echo o 192.168.1.1 >> my.ftp echo johndoe >> my.ftp echo password >> my.ftp echo bin >> my.ftp echo cd audit_dumps >> my.ftp echo get %prtfile%.prt >> my.ftp echo bye Set prtfile= Set answ= ftp -s:my.ftp ::End_Of_Batch
Summary: I have the basic batch file that will copy the files where I want them. Could someone post something I could add into my batch file that would create a file that would identify the date of the copy. ...
Summary: I'm trying to create batch file that telnets into various workstations, stops services and transfers data file. I dont user to get prompt for inputing telnet ID and password. Just want to code it into...