@ECHO OFF setlocal enabledelayedexpansion set SOURCE="E:\FileStore\A2\A3" SET DEST="E:\Dest_FileStoe\Dest_FILESTORE" echo %SOURCE% %DEST% IF NOT EXIST %DEST% mkdir %DEST%
My need is to create subdirectory with in parent folder from which file is being moved. For example: set SOURCE="E:\FileStore\A2\A3" SET DEST="E:\Dest_FileStoe\Dest_FILESTORE" If source parent folder is FileStore and Destination Parent Folder is Dest_FileStore and subfolder of FileStore is A2 and subfolder of A2 is A3 and if files are archived from A3 then in B the subfolders A2 and A3 must be created dynamically as the files with in A3 are to be archived using batfile command .
if not exist %DEST%\nul md %DEST%
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)