You are not logged in.
Pages: 1
I have been working with this project that uses WinPE and, for the most part, it's based on disk/partition/volume names.
I need to copy a lot of files to the constant disk 1 instead of using the E: drive, which could change.
disk 1 will always be the flash drive that i am trying to partition, make bootable and copy boot files to.
is there any way to use xcopy or robocopy with disk names, rather than drive names?
I am trying to avoide using: xcopy c: d: and use something that allows xcopy disk0 volume1 disk1 volume 1
Thanks,
cgman
![]()
Offline
I use a program called fsync ->http://www.vicobiscotti.it/en/fsync.htm which performs one way synchronization between my laptop (source) and usb (destination).
On my usb drive there is a unique folder DOWNLOAD and on the laptop ~USB in the root folder. The script parses all drive letters and searches for the unique folder names and if it find them sets a variable for that letter.
Maybe you could play with a similar idea as this one for your winPE scripts?
@echo off&cls
title=%~n0
FOR %%I IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO (
IF EXIST %%I:\~USB SET _laptop=%%I:\~USB
IF EXIST %%I:\DOWNLOAD SET _ns3=%%I:
)
echo. > fsync.log
fsync "%_laptop%\ns3" "%_ns3%\ns3" /F /L3+
fsync "%_laptop%\personal\zUser\Scripts" "%_ns3%\scripts" /F /D /L3+
shutdown -s -f -t 60 -c "Finished Synchronization"Known Scripting Languages: CMD, Autoit, 4DOS
Offline
Hi cgman.
Try this;
@echo off
setlocal
for /F "tokens=3" %%A in ('dosdev -a ^| findstr /B "Harddisk1Partition1"') do set SymLink=%%A
endlocal & for /F %%A in ('dosdev ^| find "%SymLink%"') do set DL=%%A
if defined DL (echo Variable DL defined. Value is: %DL%) else (
echo Error setting variable.
)Get dosdev.exe from this download;
Offline
Pages: 1