How to send a file to a certain directory in a remote computer?

Discussion in 'Software' started by r0mmel, Sep 13, 2011.

  1. r0mmel

    r0mmel Private E-2

    Hi Everyone,

    I need to transfer specific files to a certain directory in a remote server. Could you please help me on how to do it?

    Is this possible using Windows Batch Script or VBScript?


    Thank you,
    r0mmel
     
  2. r0mmel

    r0mmel Private E-2

    This is what I have so far:

    Code:
    @echo off
    
    net use h: \\[Server Name]\[Share Name] /user:[Logon Server]\[User Name] [Password]
    copy C:\file.csv F:\ /Y
    
    net use H: /del
    
    exit
    But I get the error "The system cannot find the drive specified."
     
  3. r0mmel

    r0mmel Private E-2

    I figured it out myself. I should use the drive letter I defined instead of the actual drive letter of the server.

    Hence:

    Code:
    @echo off
    
    net use h: \\[Server Name]\[Share Name] /user:[Logon Server]\[User Name] [Password]
    copy C:\file.csv h:\ /Y
    
    net use H: /del
    
    exit
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds