Command to move files - VMS

This is a discussion on Command to move files - VMS ; Hi: Is there in VMS any command like "mv" in Unix ? I want move thousands of files, and I īd like use another command than the copy command.. Thank you......

+ Reply to Thread
Results 1 to 8 of 8

Thread: Command to move files

  1. Command to move files

    Hi:
    Is there in VMS any command like "mv" in Unix ?
    I want move thousands of files, and I īd like use another command
    than the copy command..

    Thank you...

  2. Re: Command to move files

    On Dec 22, 9:49*am, apogeusiste...@gmail.com wrote:
    > Hi:
    > Is there in VMS any command like "mv" in Unix ?
    > I want move thousands of files, and I īd like use another command
    > than the copy command..
    >
    > Thank you...


    rename - as long as source and destination are on the same disk
    Phil

  3. Re: Command to move files

    On Dec 21, 2007 5:49 PM, wrote:
    > Hi:
    > Is there in VMS any command like "mv" in Unix ?
    > I want move thousands of files, and I īd like use another command
    > than the copy command..


    It depends on whether the files being moved are staying on the same disk ornot.

    If they are staying on the same disk and you want to move the entire
    directory from one location to another, you can just use the RENAME
    command to rename the directory:

    Example:

    $ rename/log disk1:[directory1]dir_to_be_moved.dir;1
    disk1:[directory2]moved_directory.dir;1

    If youi're moving between disks, you're best bet is to use the BACKUP
    command, which will preserve creation dates, directory structures,
    owner, ACLs, etc.

    $ backup/log disk1:[directory1...]*.*;* disk2:[*...]/own=orig

    If you tell us what you really want to do, we can help you.

    Ken

  4. Re: Command to move files

    On Dec 21, 5:49*pm, apogeusiste...@gmail.com wrote:
    > Hi:
    > Is there in VMS any command like "mv" in Unix ?


    - Rename, like the others indicate when it is on the same disk

    - Backup/delete for general purpose.

    Hein.

  5. Re: Command to move files

    apogeusistemas@gmail.com wrote:
    > Hi:
    > Is there in VMS any command like "mv" in Unix ?
    > I want move thousands of files, and I īd like use another command
    > than the copy command..
    >
    > Thank you...


    The VMS equivalent to "mv" is RENAME. Neither "mv" nor RENAME moves
    files. If what you want to do is to catalog a file in a different
    directory, you could try SET FILE /ENTER to create a directory entry in
    the desired directory and SET FILE /REMOVE to remove the original
    directory entry.

    Note that this may have strange effects on some BACKUP schemes.



  6. Re: Command to move files

    apogeusistemas@gmail.com wrote:
    > Hi:
    > Is there in VMS any command like "mv" in Unix ?
    > I want move thousands of files, and I īd like use another command
    > than the copy command..


    The RENAME command as described is your ticket when moving within the
    same disk. YOu should however note that in order to rename a directory
    (instead of individually renaming each file inside the directory), you
    will have to set its protection properly:

    SET FILE mydirectory.DIR/prot=(o:rwed)

    When you rename a file, it removes the entry from the parent directory
    (hence the need for the delete privilege), and creates a new entry in
    whatever directory you want.

  7. Re: Command to move files

    apogeusistemas@gmail.com wrote:
    >
    > Hi:
    > Is there in VMS any command like "mv" in Unix ?
    > I want move thousands of files, and I īd like use another command
    > than the copy command..
    >
    > Thank you...


    See HELP RENAME, and note that files cannot be RENAMED across devices.
    The rough UN*X equivalent would be across filesystems.

    As SMS noted, when "mv"-ing files across filesystems, mv does a cp
    followed by an rm. In VMS-land, one would have to do that manually. The
    rough equivalent would be BACKUP/DELETE. See HELP BACKUP.

    David J Dachtera
    DJE Systems

  8. Re: Command to move files

    In article <476C5F87.5010902@comcast.net>, "Richard B. Gilbert" writes:
    >
    > The VMS equivalent to "mv" is RENAME. Neither "mv" nor RENAME moves
    > files.


    Not true. It's been a long, long time since mv added detection of moves
    across partitions and did those as if the user entered cp and rm. I've
    never seen an mv so old as not to have that, but I've been told it
    started out without it.

    In fact I have an mv.com on my VMS systems that will look at the
    target devices and either RENAME or COPY, DELETE (latest version
    does BACKUP/DELETE).


+ Reply to Thread