Computing.Net > Forums > Disk Operating System > FOR /F: in MS-DOS 6.22 does not wor

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

FOR /F: in MS-DOS 6.22 does not wor

Reply to Message Icon

Original Message
Name: Danny84
Date: May 20, 2005 at 06:23:55 Pacific
Subject: FOR /F: in MS-DOS 6.22 does not wor
OS: MS-DOS 6.22
CPU/Ram: Pentium 2, 266 MHZ, 64 MB
Comment:

hi!

i would like to make a copy of a folder to a mapped network folder. i have a MS-DOS 6.22 (standalone!) PC. the folder name changes dinamically and it is written in a file called PRUEFNR (is automatically generated by an instrument connected to the PC). The file PRUEFNR contains only a line and there is written a number, "84235" for example. this is simple done on a W2K system with this batch file go.bat:

GO.BAT listing:
for /f %%l in (pruefnr) do set folder=%%l
copy c:\fpmc\%folder%\*.* v:\%folder% /x
set folder=

unfortunatelly the command For in MS-DOS 6.22 (Standalone!) does not support the /f option. Does anyone how to do? What it has to be done is to list the file PRUEFNR and use it's content as input to the batch file GO.BAT. I also tried with pipes, redirections, but did not succeeded :-(. i would like to solve without third party tools.



Report Offensive Message For Removal


Response Number 1
Name: Mechanix2Go
Date: May 20, 2005 at 09:23:49 Pacific
Reply: (edit)

I'm lost.

Is this one BAT or two?

Are you passing it a file or directory name?

M2


If at first you don't succeed, you're about average.


Report Offensive Follow Up For Removal

Response Number 2
Name: wizard-fred
Date: May 20, 2005 at 09:32:15 Pacific
Reply: (edit)

A little inconsistancy here. A mapped network drive on a standalone computer.


Report Offensive Follow Up For Removal

Response Number 3
Name: Mechanix2Go
Date: May 20, 2005 at 09:44:30 Pacific
Reply: (edit)

Hi wizard-fred,

Yeah, don't remember much about Novell but I used to make lastdrive=v to leave 4.

The inconsistency that threw me was file / folder.

M2


If at first you don't succeed, you're about average.


Report Offensive Follow Up For Removal

Response Number 4
Name: Danny84
Date: May 24, 2005 at 00:29:57 Pacific
Reply: (edit)

I would like to create only one batch file. What I'm passing is a folder name. It is stored in the file PRUEFNR. The PC is connected to a network. The mapped network folder is called G: (I said "standalone" to say that it's a MS-DOS 6.22 OS and not a DOS shell of 9X/NT.. sorry)


Report Offensive Follow Up For Removal

Response Number 5
Name: hiho
Date: May 24, 2005 at 01:09:31 Pacific
Reply: (edit)

MS-DOS uses Directories not Folders!


Report Offensive Follow Up For Removal


Response Number 6
Name: Danny84
Date: May 26, 2005 at 00:57:26 Pacific
Reply: (edit)

At the end I had to write a QuickBasic program...

:-(


Report Offensive Follow Up For Removal

Response Number 7
Name: Acyf
Date: June 1, 2005 at 18:21:58 Pacific
Reply: (edit)

There is a trick to using pipes and redirection for getting the contents of a text file into an environment variable, at least in XP.

When I get to work tommorrow, I will test it out in 6.22 and see if it works there as well. If it does, I will let you know.


Report Offensive Follow Up For Removal






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home








Do you have your own blog?

Yes
No
I did before
I will soon


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge
Poll History




Data Recovery Software