Computing.Net > Forums > Windows XP > Synchronizing: Folder = Date

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Synchronizing: Folder = Date

Reply to Message Icon

Name: Eric Williams
Date: March 6, 2006 at 11:42:50 Pacific
OS: Windows XP Home Edition
CPU/Ram: 2.60GHz P4 800MHz FSB HT/
Comment:

Hi. I just set up an FTP server for a friend who is going to use it to backup his business server onto his home system. The FTP client he is using allows for synchronization between the FTP server and a local folder. The only problem is that he wants a day-by-day backup of the folder. Does Windows (most likely the old DOS commands) have a function for making a new directory with the date as its name? For instance: MKDIR %date% or something similar? Than I could just write a batch script to back it up and run it every night, but I need that "date variable" if there is such a thing.



Sponsored Link
Ads by Google

Response Number 1
Name: FunTech
Date: March 6, 2006 at 12:46:05 Pacific
Reply:

You don't need FTP, you need to setup a Virtual Private Network (VPN)
Here's a page on how:
http://www.onecomputerguy.com/networking/xp_vpn_server.htm
This way, you can map a network drive to the home computer, and this will make file transfer and scripting much easier!


0

Response Number 2
Name: Eric Williams
Date: March 6, 2006 at 12:55:05 Pacific
Reply:

Although a VPN would definitely be a viable alternative solution, the problem is not transfering the files, but copying them and moving them to a date labeled directory once they are on the hard drive.

Any help would be greatly appreciated... any help... at all... about anything... please?


0

Response Number 3
Name: FunTech
Date: March 6, 2006 at 16:38:00 Pacific
Reply:

Sorry it took so long... The reason that mkdir $(date +%Y%m%d) doesn't work is because the date is in the format yyyy/mm/dd and you can't have forward slashes (/) in the name of a file or folder.

Anyway, here is a batch file that works.
You'll need to setup the VPN and map a network drive to the backup folder on the home computer.
(if the following doesn't work because of line breaks, go to my website, send me an email, and I'll email the batch file to you.)

REM Change d:\ to mapped network drive on the VPN
REM Path should end in \
set drive=d:\
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
set Year=%%l
set Month=%%j
set Day=%%k
set Date=%%l-%%j-%%k\
)
set Path=%drive%%Date%
mkdir %Path%
REM Change c:\folder\* to the file or folder you wish to backup
REM duplicate the next line to copy multiple folders or files
c:\windows\system32\xcopy.exe /s c:\folder\* %Path%


0

Response Number 4
Name: Eric Williams
Date: March 7, 2006 at 12:36:46 Pacific
Reply:

You are my hero. I can't wait untill college so I can start devoting more of my time to this. I really appreciate the help!

Any help would be greatly appreciated... any help... at all... about anything... please?


0

Response Number 5
Name: FunTech
Date: March 7, 2006 at 21:37:55 Pacific
Reply:

You're very welcome, and thanks for the kudos!!!
Have fun in college!


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Synchronizing: Folder = Date

XP folder synchronizing www.computing.net/answers/windows-xp/xp-folder-synchronizing/59976.html

folder synchronizer www.computing.net/answers/windows-xp/folder-synchronizer/151256.html

Folder's modified date problem www.computing.net/answers/windows-xp/folders-modified-date-problem/140223.html