does ROBOCOPY have any command options to create source folder if not exist - robocopy

For example, if source folder is c:\abc\file1 which doesnot exist..it should create the folder in source rather than throwing this error
ERROR 2 (0x00000002) Accessing Source Directory cc:\abc\file1
The system cannot find the file specified.

Related

Moving files from one folder to an archive folder in same remote directory

I am trying to move remote files from one folder to another but keep getting a failure error.
Code:
$command = #("mv /specific/directory/path/source/* /specific/directory/path/destination", "ls //specific/directory/path/source")
$psftpPath = "local/path/to/psftp.exe"
$command |& $psftpPath -pw $password "$User#$Host" -be
Error
mv /user/specific/directory/path/source/file.extension /user/specific/directory/path/destination/file.extension: failure
The ls command does show all the right files in source
The error Failure refers to status code 4 with the following common reasons:
Renaming a file to a name of already existing file.
Creating a directory that already exists.
Moving a remote file to a different filesystem (HDD).
Uploading a file to a full filesystem (HDD).
Exceeding a user disk quota.
I haven't tried your script, but I think that you can can follow the list above as a checklist.

COPY failed: stat /var/lib/docker/tmp/docker-builderXXXXXXXX/java-common/ug-common/src: no such file or directory

I am having following error when copying the file. Why is that?
docker-compose up
COPY failed: stat /var/lib/docker/tmp/docker-builderXXXXXXX/java-common/ug-common/src: no such file or directory
Whatever file / directory you're trying to copy into your image doesn't exist in your build context. Set context to a directory that contains everything you need and dockerfile to the path of your dockerfile within it.
https://docs.docker.com/compose/compose-file#build

move all files and folders within a directory in matlab

I'm trying to move all files and folders within a directory to another location. I thought
movefile('D:\path\to\source\*', 'D:\destination\folder')
would work, but this gives me an error
Error using movefile
The requested lookup key was not found in any active activation context.

move only specific folders and subfolders using mv

I am trying to move specific folder and subfolders from a directory. In the below I am trying to move a folder BAM and its two subfolders and another folder Bedtools from the main directory to a destination but getting the errors below. Thank you :).
folder structure
8-21-2016 -- Top level is date
BAM -- parent directory
Coverage --child directory
Validation -- child directory
Bedtools -- parent directory
Test -- parent directory
ID -- parent directory
mv -u /home/cmccabe/Desktop/NGS/API/6-10-2016/bam/* bedtools/ /media/cmccabe/"My Book Western Digital"
mv: inter-device move failed: ‘/home/cmccabe/Desktop/NGS/API/6-10-2016/bam/coverage’ to ‘/media/cmccabe/My Book Western Digital/coverage’; unable to remove target: Is a directory
mv: cannot stat ‘bedtools/’: No such file or directory
Apparently bedtools does not exist in your local path. And about the other error message mv: inter-device move failed: ‘/home/cmccabe/Desktop/NGS/API/6-10-2016/bam/coverage’ to ‘/media/cmccabe/My Book Western Digital/coverage’; unable to remove target: Is a directory, probably that folder is not writable for your user. Move mv command will remove it from the device but probably you don't have the rights.
Check trying as root (with sudo) for the second problem. For the bedtools folder, please check your local path.

Robocopy Error 3 "System cannot find the file specified" for 1 file in the folder

I am trying to copy a folder from the network path to my machine .But while copying the folder the robocopy suddenly got stuck in copying 1 file from the folder and did not proceed forward . I am seeing the error ERROR 3 (0x00000003) , "The System cannot find the path specified." , even though the file did exist in the source directory.
The command that I use is
ROBOCOPY source destination /MIR /Z /Log+:logs.txt
I am seeing this issue when my executable is triggered by the task scheduler. This issue does not happen when i run the exe directly. Any idea why this could be happening and also how to fix this problem
When robocopy claims it cannot find a file, it often means it is running into permission issues. If your script works from the command line, but not from the task scheduler, make sure the task uses your user credentials. You can set them in the task properties on the general tab under security options.