I use Virtualbox with host Windows 7 and guest WIndows 7.

I created a batch file to move a folder (with files and subfolder inside) from E: shared folder of Virtualbox to D: (My Hard Drive)

This batch files if is launced from guest machine copy all files and subfolder and after delete the folder from shared folder of Virtualbox (works).

Now i tryed to launch this batch file foldertomove.bat saved on guest machine via psexec insiede a batch file in Host Machine but do not work, return path error (is the same batch file foldertomove.bat saved in Guest Machine and launced from Guest Machine Works).

batch file foldertomove.bat in Guest machine (works if launched from guest machine only)

:: 'Code'
xcopy /Y /E "E:\Folder To Move" "D:\Folder To Move"
del /S /Q "E:\Folder To Move"
rmdir /S /Q "E:\Folder To Move"
ping -n 10 localhost >nul 2>&1

Batch files in Host machine with psexec command

psexec -d -i -u Username -p Password \PC-NAME "D:\foldertomove.bat"

E: is the shared folder of Virtualbox that contains folder to move

Why if I launch foldertomove.bat from Guest machine works and if i launch foldertomove.bat from a batch file with Psexec from Host machine give my Path Error ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.