Heya group! I have some 95 and 98 clients that don't seem to have the %username% environment variable set even though they're logged onto the network. Anyway...
506
Jim Knopf
jknopf@...
Jan 2, 2001 9:29 pm
... @echo off if .%1==. goto:Get if NOT .%1==./? goto:Set echo Sets USERNAME variable to the username. echo. echo [CALL] USERNAME for %%a in (echo....
507
Jason Bias
jbias@...
Jan 2, 2001 9:36 pm
Excellent! I got as far as getting the "username" = "jb" into a txt file. Couldn't figure out what to do from there. This should save me a ton of work....
508
jbias@...
Jan 5, 2001 11:11 pm
Hello again I'm trying to run a scripted FTP session launched from a choice driven menu in a batch file but when it hits the ftp.exe line, instead of loading...
509
Verne A.
zanzi_spot@...
Jan 6, 2001 1:32 pm
You don't want to invoke ftp.exe in that manner.
Want you want to do is set up a text file with your ftp commands and point your batch at it.
Here is mine...
510
John Tremper
Jtremper@...
Jan 10, 2001 4:05 pm
I need to be able to dir on a root directory, then create a new directory for every file in the root, then copy each file in to it's own directory. Example:...
511
Michael Marquart
micm@...
Jan 10, 2001 4:35 pm
On Wed, 10 Jan 2001 15:56:33 -0000 Subject: [BATCH WORLD] File Copy Loop "John Tremper" <Jtremper@...> wrote: Post what you have done and you'll get...
512
John Tremper
Jtremper@...
Jan 10, 2001 6:01 pm
Ok, here goes: set FileDirectory = "C:\John\temp\*.txt" set FileName = Dir (FileDirectory) Do While FileName<>"" chdir C:\John\Production mkdir...
513
Michael Marquart
micm@...
Jan 10, 2001 7:18 pm
On Wed, 10 Jan 2001 17:46:45 -0000 Subject: [BATCH WORLD] Re: File Copy Loop "John Tremper" <Jtremper@...> wrote: If you're using Win9x then you'll...
514
John Tremper
Jtremper@...
Jan 10, 2001 7:46 pm
I am using NT, thanks for the help Michael. ... extract the ... for ... using the ... have ... with ... Thanks ... unsubscribe@e......
515
Jim Knopf
jknopf@...
Jan 10, 2001 9:06 pm
... I suggest this routine: @echo off ... set DEBUG=echo if ~%1==~:Reentry for %%C in (shift goto:Reentry) do %%C ... set FileMask=C:\John\temp\*.txt set...
516
Jim Knopf
jknopf@...
Jan 10, 2001 9:35 pm
... From: "John Tremper" <Jtremper@...> To: <batchworld@egroups.com> Sent: Wednesday, January 10, 2001 8:29 PM Subject: [BATCH WORLD] Re: File Copy...
Jim, Do I need to set the DEBUG variable to something else when I remove echo? When I run the program I get Environment variable DEBUG not found. Otherwise,...
519
Jim Knopf
jknopf@...
Jan 11, 2001 11:35 pm
... you don't to set the DEBUG var to something else. If you don't want to echo the core command lines %DEBUG% md "%DestDir%\%%~nF" %DEBUG% move "%%F"...
520
John Tremper
Jtremper@...
Jan 12, 2001 1:24 pm
I removed 'echo' from the DEBUG= line. It ran ok, but I don't see where the directories in c:\john\production were created. The *.txt files are still in the...
521
Jim Knopf
jknopf@...
Jan 12, 2001 11:28 pm
... It looks ok. Hm, silly question: Did you save the code before re-running it? Whatever, try this: @echo off setlocal set FileMask=C:\John\temp\*.txt set...
522
Michael Marquart
micm@...
Jan 13, 2001 12:16 pm
On Sat, 13 Jan 2001 00:31:49 +0100 Subject: Re: [BATCH WORLD] Re: File Copy Loop "Jim Knopf" <jknopf@...> wrote: Grasping at the intangible here, but the...
523
Jim Knopf
jknopf@...
Jan 14, 2001 1:38 am
... reason ... CMD ... '&' is the simplest compound command symbol in the windows nt command shell. The '&' symbol separates multiple commands on a single...
524
Michael Marquart
micm@...
Jan 14, 2001 12:25 pm
On Sun, 14 Jan 2001 02:28:46 +0100 Subject: Re: [BATCH WORLD] Re: File Copy Loop ... Understood - useful additions. ... It does - thanks. Regards Mic...
525
John Tremper
Jtremper@...
Jan 15, 2001 2:04 pm
Jim, Getting closer. I did not have the *.txt files in the temp directory. Now it runs and moves the files, but only one directory is created in the...
526
Michael Marquart
micm@...
Jan 15, 2001 4:28 pm
On Mon, 15 Jan 2001 14:04:34 -0000 Subject: [BATCH WORLD] Re: File Copy Loop "John Tremper" <Jtremper@...> wrote: Try changing both occurances of...
527
Jim Knopf
jknopf@...
Jan 15, 2001 6:02 pm
... Hm, exactly the same batch works fine here! Of course, you need to change set FileMask=C:\John\temp\*.txt if you don't have *.txt files in the C:\John\temp...
528
John Tremper
Jtremper@...
Jan 15, 2001 6:22 pm
I get the following error: "The following usage of the path operator in batch-parameter substitution is invalid: %~nF". Then it tells me to refer to the...
529
John Tremper
Jtremper@...
Jan 15, 2001 6:28 pm
Yup, have it set up that way. Here is what I have: @echo off setlocal set FileMask=C:\John\temp\*.txt set DestDir=C:\John\Production\ for %%F in (%FileMask%)...
530
Michael Marquart
micm@...
Jan 15, 2001 7:05 pm
On Mon, 15 Jan 2001 18:07:57 -0000 Subject: [BATCH WORLD] Re: File Copy Loop ... Ok. Maybe there are meant to be two consequtive % signs then. set...
531
Jim Knopf
jknopf@...
Jan 15, 2001 8:26 pm
... Yes. The trailing slash should be removed....
532
John Tremper
Jtremper@...
Jan 15, 2001 9:59 pm
... operator ... tells me ... After removing the trailing slash, I am getting the same results. The directories are not being created, just one is with the...
533
Ismael Martinez
ismael_mtz@...
Jan 16, 2001 6:41 pm
Hello: Iam trying to get the number of lines in a text file (.txt or .dat), does anyone know how I can do this using a batch file? Any response would be very...
534
Newsletter
newsletter@...
Jan 16, 2001 7:11 pm
Hello List, How do I automatically close a command prompt window after a batch file runs on a Windows98 machine? Thanks, steve...