I am aware of the fact that this could be done more easily with copy and paste, but the point here is to use VBA to automate the process so some other people can just click a button and the file will be copied automatically. I have tried to use copy command under cmd but failed, as this does not invoke the password prompt windows so no way to access the hard drive. Is there any other way to tackle this issue? It does not matter if the user name and password cannot be embedded as part of the command. If the command can manage to pop up the window for user name and password entries that is also acceptable. Any suggestions? Thanks.
How to copy a file from local hard drive to a mapped drive with password using cmd?
1.9k Views Asked by God_of_Thunder At
1
There are 1 best solutions below
Related Questions in VBA
- Import from api into multiple excel cells
- Loop through list of files and open them
- Pull and push data from and into sql databases using Excel VBA without pasting the data in Excel sheets
- Loop with equation for upper limit
- excel vba null value in array
- TextToColumns function uses wrong delimiter
- Access Global not working
- Concatenate string and number as number
- How do I extract info from crunchbase
- Excel needs to pull substring values to variables
- Act on Outlook mail item when opened for editing
- Macro is not working
- Excel 2013 VBA opening multiple windows for a single workbook
- Hyperlink directs to hidden row
- How to modify data in a range of a column of cells that are not blank
Related Questions in COPY
- Objective-C Reference to object that implements protocol
- Copy to clipboard from Firefox add-on content script
- Implementing ICollection.CopyTo in C#: deep or shallow copy?
- Trying to create a Bath file that will copy a specific directory path (no lower) and zip the directories in that path
- C# How to get file/ copy file from a bzip2 (.bz2) file without extracting the file
- fast converting Bitmap to BitmapSource wpf
- include typescript file in output result build with TFS
- How to copy a table to another with primary key?
- Automated Testing (Watir): Retrieving data and implementing into your test?
- Php email send copy to sender
- Batch - xcopy files older than x minutes
- Copy rows with a specific condition
- Copy permissions form source file to file with same name
- SQL, postgres. I have a csv input file with columns like avg. When i export how do i keep my digits?
- The "trait Clone is is not implemented" when deriving the trait Copy for Enum
Related Questions in CMD
- Execute a command over multiple files
- R CMD recognize only some commands
- FIle download via cmd in windows using HTML
- CMD/BATCH - Had to run batch script 3 times to get full result
- Lauching program via command in php
- CMD specifying columns to save?
- Set environment in current cmd using batch script
- Running a powershell command inside cmd script and replacing string content
- Is it possible to close every application via a batch file?
- Implementing timed input in batch file. (countdown to a minute)
- How to remove "Remote desktop disconnected" window and close mstsc.exe
- Extracting specific registry key from REG QUERY based on search string
- Blank path in environment variable causing elevated command prompt to not respond
- CMD - Takeown giving "The data area passed to a system call is too small"
- Compare 2 text files and display the difference between them (PowerShell or CMD)
Related Questions in MAPPED-DRIVE
- Check if a drive is mapped and active
- Windows 8: Task Scheduler Mapping Network drive with batch file or VBS
- Build fails on mapped drive, but not locally
- Inno Setup - {drive:src} is not returning mapped drive letter in Win7 and Win8
- recover disconnected mapped drive
- FileNotFoundError: [Errno 2] No such file or directory, mapped drive, Python
- How detect if mapped network drive is disconnected using IShellFolder?
- Determine Domain and username used to map a network drive
- Using PHP's fopen in windows on a network drive
- Mapping/unmapping drives failing
- Linux Symbolic link to Mapped Drive
- Full path of the file from the remote server
- How would I provide access to my Windows V:\ drive in a docker-compose.yml file?
- How to make `os.path.isdir()` work for mapped network drives?
- How to copy a file from local hard drive to a mapped drive with password using cmd?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
you can use vba to prompt for username and password, or store them in the file (whichever is applicable to your needs)
the command to map a drive that has a username and password is
and
when you are finished with a mapped drive, you can use
object.Copy destination[, overwrite]to copy the file, orSaveAsif you want a copy of the current file