Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: small batch program's I find and make enjoy from DeltaSpider  (Read 22699 times)

0 Members and 1 Guest are viewing this topic.

Edward

  • Guest
Re: small batch program's I find and make enjoy from DeltaSpider
« 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?

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: small batch program's I find and make enjoy from DeltaSpider
« 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)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

Edward

  • Guest
Re: small batch program's I find and make enjoy from DeltaSpider
« 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?

Edward

  • Guest
Re: small batch program's I find and make enjoy from DeltaSpider
« 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?