Home / Microsoft / Microsoft DOS / small batch program's I find and make enjoy from DeltaSpider
0 Members and 3 Guests are viewing this topic. « previous next »
Pages: 1 2 3 [4]  All - (Bottom) Print
Author Topic: small batch program's I find and make enjoy from DeltaSpider  (Read 8649 times)
Edward
Guest
« Reply #45 on: April 24, 2007, 10:01:54 AM »

I guess I will keep it as is with XCOPY.  From what I understood a regular copy does not allow the copying of subfolder especialy if they are empty.  I do need to structure a way in which I can have the files backed up on Tuesday go to a folder called Tuesday and so on.  What would be the best lay out for this?
IP logged
Sidewinder
Guru



Thanked: 97
Posts: 4,341

Experience: Familiar
OS: Windows 7

« Reply #46 on: April 24, 2007, 03:53:54 PM »

Depending on your regional settings, you can use the value of the date command:

Code: [Select]
@echo off
for /f "tokens=1,2" %%x in ('date /t') do (
set dow=%%x
)
if %dow%=Mon set folder=c:\Monday
if %dow%=Tue set folder=c:\Tuesday
.
.
.

Try running the date /t command at the command prompt. You may not even have the day of week showing in the output which will make this all the more difficult.

Good luck. 8)
IP logged

If you don't know where you are going, any road will get you there

                                                                            -Lewis Carroll
Edward
Guest
« Reply #47 on: April 26, 2007, 03:20:46 PM »

This is the output I use as the default for all machines: Thu 04/26/2007

@echo off
for /f "tokens=1,2" %%x in ('date /t') do (
   set dow=%%x
   )
if %dow%=Mon set folder=c:\Monday
if %dow%=Tue set folder=c:\Tuesday

I would assume that in the two 'if' lines I have to specify the direct path to the folders I have created?  Will all these commands work on XP pro?
IP logged
Edward
Guest
« Reply #48 on: April 27, 2007, 03:01:46 PM »

Sidewindes,

I placed the code that you provided and got a '=Mon was unexpected at this time' message.  What are the areas I must modify other than the folder paths?  Is there something I missed?
IP logged
Pages: 1 2 3 [4]  All - (Top) Print 
Home / Microsoft / Microsoft DOS / small batch program's I find and make enjoy from DeltaSpider « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.07 seconds with 19 queries.