home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.programmer
- Path: sparky!uunet!dcatlas!joet
- From: joet@dcatlas.dot.gov (Joe Trott)
- Subject: Re: Batch problem
- Message-ID: <1992Nov13.180336.1678@dcatlas.dot.gov>
- Organization: U.S Dept. of Transportation
- References: <1dualbINN52t@usenet.INS.CWRU.Edu>
- Date: Fri, 13 Nov 1992 18:03:36 GMT
- Lines: 33
-
- au240@cleveland.Freenet.Edu (Ari Pitkanen) writes:
-
-
-
- >How do I pass '%%f' to 'DoIt'? This approach don't work.
-
- >---
- >:Main
- >cd scene
- >for %%f in (*.*) do goto DoIt REM copy filename to %%f
- Try..................CALL DoIt %%f
- cd ..
-
- Make DoIt a separate batch file.
-
- >:DoIt REM Scrap this line
- >cd.. REM This could be a trick...you might need PUSHDIR and
- REM POPDIR, two little utilities that save and recall the
- REM current directory.
- >trace scene\%1
- >copy scene\%1 traced
- >del scene\%1
- >cd.. REM Again, cd-ing in a called batch file can be trouble. You
- REM may need to specify your directories or use more parameters.
- >goto Main REM Scrap this line too.
-
- You might try passing the directories used as parameters, e.g.
- CALL DOIT %%f dir1 dir2 dir3 instead of using those CD commands in DOIT.
- (Otherwise, those cds will have a cumulative effect that you probably don't
- want; backing you up to the root)
-
- -JTT
-
-