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
- Toggle "conversation view" in Outlook with VBA
- VBA query - sort text in alphabetical order in Word
- Excel - Visual Basic, macro with autofill "1"
- Getting Run-time error '13': Type Mismatch using .Find
- Getting website metadata (Excel VBA/Python)
- How to use VBA to bold just some text
- VBA Code to filter and get values from csv to excel worksheet
- Azure Batch for Excel VBA
- How can i printpreview multiple excel sheets, with the names of the sheets located in a range?
- Comparison the data of two row and unique number highlight and show below of it
- Is there a way to pass Today's date as a command line argument to Excel from a Windows Task Scheduler Job
- Xero Upload Invoice file using API
- Visual Basic For Application Related Question
- Trying to give color to column field headers in pivot table with vba
- General error handler: If any error in UserForm other than msgBox: Err.Description
Related Questions in COPY
- What is correct way to copy struct instance with fields in Go?
- On paste StartFragment - EndFragment Postman issue
- Copy paste a single value from within a cell to another cell
- Char array, char pointer, works in one case but not the other?
- Macro to copy, rename and organize a template worksheet
- Stored procedure with copy statement keeps running when called
- How can creation times be preserved while copying on Mac?
- Automate buildozer with windows bat file and ubuntu script
- If Cell contains specific text in col A copy cell from Col C into Col F stacked
- Why do I have a 403 error when trying to save a website
- SSRS Report - Graph when exported is compressed into a graphic
- Need to copy multiple cells in the same row of data from one sheet to another when a Checkbox is checked
- Is there a way to set an open workbook as a source without having the file name?
- How do you deep copy a variant of pointers in C++?
- Python Copy dictionary
Related Questions in CMD
- Set req query output to a variable
- 'No such file or directory' installing RTC-Tools through pip
- Merge all *csv and remove duplicate headers using command prompt except top row
- Trying to launch batch file from powershell, and immediately closes
- How to export CMD output to a text file in C# after all the text printing on the CMD window is done?
- 'pip install mariadb' states that it cannot find include file 'mysql.h' on my Windows 10 dekstop
- Python Console commands
- How use subprocess.run with cmd external program in phython
- How do I restart a batch file in PowerShell?
- execute cmd commands as admin with java code
- PostgreSQL 16 database will not run as service, must have a CMD open for it to work
- How can I unload Visual Studio projects via batch file/developer command prompt?
- Connect to a specific country using Psiphon vpn from Command line
- How do I run multiple instances of my Powershell function in parallel?
- cmd command through powershell fails with error "The string is missing the terminator: '."
Related Questions in MAPPED-DRIVE
- How to make `os.path.isdir()` work for mapped network drives?
- How would I provide access to my Windows V:\ drive in a docker-compose.yml file?
- Using PowerShell 5.1 on Windows 10, I successfully map a drive, but it doesn't when running by Scheduled Task
- A Scheduled Task to transfer one LARGE file from one mapped drive to another failed but worked when file split into 3 separate files
- How to evaluate all LogicalDisk instances in a machine excluding mapped network drives?
- wmic - don't work when runs from Task Scheulder (`No Instance(s) Available.` @ win10 )
- Why Inno Setup installer doesn't handle correctly network drive?
- Error: The system cannot find the drive specified (while accessing a mapped drive remotely) using winrs
- Powershell - removing subfolder recursively in a mapped drive getting error Illegal characters in path
- Does running a jupyter notebook on a mapped network drive make it run slower?
- Deleting files on a mapped drive using c# and IIS
- My file is not being created in the mapped drive when I try to create it using progress 4gl
- UNC path is Replaced by Mapped Drive
- How to save/write file over mapped network in PHP?
- How do I run a cmd command without admin rights from an elevated application?
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