1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

primary and secondary CWD

Discussion in 'Suggestions' started by Roedy, Nov 10, 2011.

  1. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    120
    Likes Received:
    2
    This has bothered my since 4DOS days.

    DOS/Windows has the concept of a CWD, current working directory, but what you really want is a SOURCE CWD and TARGET CWD or Primary/Secondary CWD.

    Then any thing that worked across directories or directory trees would be much simpler.

    copy x.txt y.txt

    instead of copy E:\a\b\c\x.txt F:\bks\a\b\c\y.txt

    if prime:x.txt exists if exist sec:t.txt echo dup t

    I am not sure quite what syntax you would need to indicate primary and secondary that would not break existing scripts.

    You can do things like
    set source=xxx
    set target=yyy
    if %source\x.txt exists if exist %target\t.txt echo dup t

    I just wondered what might be possible be build the concept in more smoothly. I originally envisioned something like QDOS or Magellan with a source and target panel so it was always visually clear which directories would be acted upon when you say selected some files for copy.
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,300
    Likes Received:
    39
    Have you looked into directory aliases?
     
  3. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,187
    Likes Received:
    11
    You could use directory aliases to accomplish that.

    alias s1:=c:\dir1\dir2\dir3
    alias s2:=d:\dir1\dir2\dir3

    copy /s s1:x.txt s2:y.txt

    if isfile s1:x.txt .and. isfile s2:y.txt echo dup x.txt

    -Scott

    Roedy <> wrote on 11/10/2011 11:05:39 AM:


    CWD.

    copy.
     

Share This Page