Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.



Windows 7: How can Windows 7 create a folder with CD volume name?

30 Mar 2011   #1

Windows 7 Enterprise 64 bit
 
 
How can Windows 7 create a folder with CD volume name?

Do you have any suggestions how to created a macro to copy full data CD or DVD to harddisk creating a folder with this CD or DVD volume name?
Purpose is just to speed up copying and restoring multi DVD archives.

Windows 7 Enterprise.

Thanks for any ideas!

My System SpecsSystem Spec
.

31 Mar 2011   #2

Windows 7 Enterprise 64 bit
 
 

In XP I used xset.exe and xset32.cmd but ASFAIK these are not freeware and registration/fees is obscure for given task.

I don't know if these Dos command works in Windows 7 64bit at all and I don't dare to mess with my working machine checking it out. But looks like it can be run in 32 bit system only
http://xset.tripod.com/index.html


But something more up to date should be much appreciated - doesn't Windows 7 x64 offer any new solutions?

Batch file which worked in Windows XP x32:

:START
CALL XSET32 CD-LABEL VOLLABEL D:
IF EXIST %CD-LABEL%\NUL GOTO EXIST

MD %CD-LABEL%
XCOPY D:\*.*/e %CD-LABEL%


ECHO Insert New CD
PAUSE
GOTO START

:EXIST
ECHO %CD-LABEL% Already Exists
:END
My System SpecsSystem Spec
31 Mar 2011   #3

Windows 7 Home Premium x64 OEM --> RTM clean install
 
 

Dos command XCOPY.

In command prompt type help.
My System SpecsSystem Spec
.


31 Mar 2011   #4

Windows 7 Enterprise 64 bit
 
 

Quote   Quote: Originally Posted by allend66 View Post
Dos command XCOPY.

In command prompt type help.
Thanks for your reply - but most important part is folder creation and xcopy IMO doesn't support reading CD volume label and creating folder.
My System SpecsSystem Spec
31 Mar 2011   #5

 
 

Hi,

You could try the following...

Code:
@echo off
cls
for /f "tokens=1-6" %%A in ('vol d:') do (
    set vol=%%F & goto rumble 
)
:rumble
if exist %vol% (
   echo Destination folder %vol% already exists... & goto newname
   ) else (
   md %vol%
   xcopy "d:\*.*" "%vol%" /e /s
)
cls
exit/b
:newname
set /p vol=Enter new name for destination folder:  
goto rumble
I've tested it with 100% success
Note   Note
Once you save the batch file it will create the new folder in the folder that it's run in e.g. Running in "Downloads" will create "Downloads\[new folder]". Remember to make changes to drive letter if needed.


Additional
You could make changes to the md %vol% and xcopy "d:\*.*" "%vol%" /e /s to include a folder (path) of your choice. For example md C:\[my folder]\%vol%\ or xcopy "d:\*.*" "C:\[my folder]\%vol%\" /e /s.
My System SpecsSystem Spec
31 Mar 2011   #6

 
 

Here's a pic of it after it finished...

How can Windows 7 create a folder with CD volume name?-capture.png


My System SpecsSystem Spec
31 Mar 2011   #7

Windows 7 Enterprise 64 bit
 
 
a windows 7 - a great improvement indeed!

I've tested it with 100% success
Note   Note
Once you save the batch file it will create the new folder in the folder that it's run in e.g. Running in "Downloads" will create "Downloads\[new folder]". Remember to make changes to drive letter if needed.


Additional
You could make changes to the md %vol% and xcopy "d:\*.*" "%vol%" /e /s to include a folder (path) of your choice. For example md C:\[my folder]\%vol%\ or xcopy "d:\*.*" "C:\[my folder]\%vol%\" /e /s.[/QUOTE]

I confirm - batch runs on Windows 7 x64 like a charm. Great work and thanks for sharing your experiences!

On improvement - how to leave the the command window open to repeat copy function after inserting next CD and pressing mysterious "any key"
That's in order not to navigate to find batch file for next CD copy.

If there is still the same CD volume in drive then error "insert new disk" or when next disc doesn't have different volume name then "rename folder" or what's even better to give warning beep and rename next copy adding to the folder name (1).

Are these additions supported in Windows 7 x64?

As final step - this Cd Vol xcopy shortcut should be integrated for public usage to Windows 7 taskbar, explorer right mouse button menu or just as keyboard shortcut.
(To CD Vol Xcopy drive N: to predetermined HDD partition)
My System SpecsSystem Spec
31 Mar 2011   #8

 
 

I'll look into it but it wont be until tomorrow as I'm about to go to work
My System SpecsSystem Spec
31 Mar 2011   #9

Windows 8 Core X64
 
 

SOmething like this should work:
Code:
@echo off
:Top
cls
for /f "tokens=1-6" %%A in ('vol d:') do (
    set vol=%%F & goto rumble 
)
:rumble
if exist %vol% (
   echo Destination folder %vol% already exists... & goto newname
   ) else (
   md %vol%
   xcopy "d:\*.*" "%vol%" /e /s
)

Echo Press Enter when ready to continue with next CD or DVD.
Echo Press Ctrl+C to terminate this batch program.
pause
goto Top

:newname
set /p vol=Enter new name for destination folder:  
goto rumble
My System SpecsSystem Spec
01 Apr 2011   #10

Windows 7 Enterprise 64 bit
 
 

Quote   Quote: Originally Posted by Ztruker View Post
SOmething like this should work:
Code:
@echo off
It works! Confirmed Windows 7 x64. Thanks a lot!

I don't know how many other forum users give value to a painless copy CD to harddisk batch but until backups and archives are on removable media, I use such a batch rather often.

How to implement another version when the volume label folder exists, which inserts number (+1 in paranthesis) to the folder end?
Some multi CD archives have a default volume name like "Disc" except the one written to disk surface.

Thanks!
My System SpecsSystem Spec
Reply

 How can Windows 7 create a folder with CD volume name?





Thread Tools



Similar help and support threads for2: How can Windows 7 create a folder with CD volume name?
Thread Forum
Partition or Volume - Create New Tutorials
Create Windows Backup (from Recover Folder) Backup and Restore
Create volume or partition? General Discussion
Solved How can I create a custom folder template in Windows 7 Customization
Cannot create/delete shortcuts in any folder in windows 7 General Discussion
How do I create file and folder pairs in Windows? General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 12:34 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33