Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Desktop Feature Requests Page: 1  Previous   Next
Backup File Variable Filenames
Author Message
DVD Profiler Unlimited Registrantritchf
Loop (noun): see Loop
Registered: March 18, 2007
United Kingdom Posts: 150
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Would love to have the ability to construct my own filename based upon "system variables"

For instance I always back up my database to [BACKUP PATH]\DVDProfilerBackup.[YY]-[MM]-DD]

Anyone else think this would be useful?

Ritch
Learning is not mandatory, but then neither is survival.
DVD Profiler Unlimited RegistrantStar ContributorVirusPil
uncredited
Registered: January 1, 2009
Reputation: Highest Rating
Germany Posts: 3,087
Posted:
PM this userDirect link to this postReply with quote
+1 
Not bad. Til now I change the name of the backup file every day manual.
DVD Profiler Unlimited RegistrantStar ContributorArdos
Registered: July 31, 2008
Reputation: High Rating
United Kingdom Posts: 2,506
Posted:
PM this userDirect link to this postReply with quote
Indeed, it sounds like a good idea.

DVD Profiler Unlimited RegistrantStar ContributorPistol Pete
Registered: March 19, 2007
Finland Posts: 259
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
+1
Markku
DVD Profiler Desktop and Mobile RegistrantDr. Killpatient
Here's my card
Registered: May 19, 2007
Reputation: Highest Rating
United States Posts: 5,917
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
DVD Profiler Unlimited RegistrantStar ContributorLewis_Prothero
Strength Through Unity
Registered: May 19, 2007
Reputation: Superior Rating
Germany Posts: 6,730
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
It all seems so stupid, it makes me want to give up!
But why should I give up, when it all seems so stupid?


Registrant since 05/22/2003
DVD Profiler Unlimited RegistrantStar ContributorGSyren
Profiling since 2001
Registered: March 14, 2007
Reputation: Highest Rating
Sweden Posts: 4,684
Posted:
PM this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
My freeware tools for DVD Profiler users.
Gunnar
DVD Profiler Unlimited RegistrantCool_doodad
Registered: March 13, 2007
Canada Posts: 404
Posted:
PM this userEmail this userDirect link to this postReply with quote
You can sort of do this now by creating a .bat file.

@echo off
echo BackupAll "[Backup Path]\Backup%random%.dpb" RenameExisting > "[Backup Path]\Command.txt"
"C:\Program Files\DVD Profiler\dvdpro.exe" /CommandFile="[Backup Path]\Command.txt"

Create a text file into this directory called dvdpro.bat and paste in the above 3 lines of code. Call it something like DVDProBackup.bat
Then run the batch file.
This will run dvdpro and create a backup file called Backup#####.dpb where ##### is just some random number. You can sort the directory by date and you will have a listing of all your backups in date order.

It's not completely perfect, I would have liked to use date instead of a random number but then it tried to create a file with /, which isn't allowed. Didn't want to spend the time trying to figure out how to remove them in the script.
The Other DVD Forum
Why do people who know the least know it the loudest?
DVD Profiler Desktop and Mobile RegistrantAgrare
Registered: May 22, 2007
Reputation: High Rating
United States Posts: 1,033
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
If you want to use Cool_doodad's batch solution but still want the date you can use this batch code to get the date (in YYYY-MM-DD format, I use that because if you sort by name it keeps files in order across years and month)

Quote:

@For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Day=%%A
Set Month=%%B
Set Year=%%C
)

SET mydate=%Year: =%-%Month: =%-%Day: =%


just put that chunk of code on the line after @echo off and replace %random% with %mydate%

-Agrare
DVD Profiler Unlimited RegistrantStar Contributorapltm
Registered: May 11, 2007
Netherlands Posts: 249
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
DVD Profiler Desktop and Mobile RegistrantAgrare
Registered: May 22, 2007
Reputation: High Rating
United States Posts: 1,033
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Oh, forgot to add. The @For line may need to be adjusted depending on your locality. The way it is currently written will work for US. It shouldn't be too hard to convert to other localities though. The site I found that part from someone actually posted the line for German locality

@For /F "tokens=1,2,3 delims=. " %%A in ('Date /t') do @(

-Agrare
DVD Profiler Unlimited RegistrantCool_doodad
Registered: March 13, 2007
Canada Posts: 404
Posted:
PM this userEmail this userDirect link to this postReply with quote
Quoting Agrare:
Quote:
If you want to use Cool_doodad's batch solution but still want the date you can use this batch code to get the date (in YYYY-MM-DD format, I use that because if you sort by name it keeps files in order across years and month)

Quote:

@For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Day=%%A
Set Month=%%B
Set Year=%%C
)

SET mydate=%Year: =%-%Month: =%-%Day: =%


just put that chunk of code on the line after @echo off and replace %random% with %mydate%

-Agrare


Nice...It's been years since I've messed with batch files. Green arrow for you.
The Other DVD Forum
Why do people who know the least know it the loudest?
DVD Profiler Unlimited RegistrantStar ContributorMithi
Sushi Annihilator
Registered: March 13, 2007
Reputation: Superior Rating
Germany Posts: 2,217
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Awesome Batch-Magic!

Quoting Agrare:
Quote:
The @For line may need to be adjusted depending on your locality. [...] It shouldn't be too hard to convert to other localities though.

Jupp, just type "date /t" in a command-line and look what your date looks like. Worked perfect for me when I tried to add hours and minutes with "time /t". 

@echo off
SET BackupPath=C:\Users\Mithi\Documents\DVD-Profiler-DB
@For /F "tokens=1,2,3 delims=. " %%A in ('Date /t') do @(
Set Day=%%A
Set Month=%%B
Set Year=%%C
)
SET mydate=%Year: =%-%Month: =%-%Day: =%
@For /F "tokens=1,2 delims=: " %%A in ('Time /t') do @(
Set Hour=%%A
Set Minute=%%B
)
SET mytime=%Hour: =%%Minute: =%
SET mydatetime=%mydate%-%mytime%
echo BackupAll "%BackupPath%\Backup-v3.6-%mydatetime%.dpb" NoCoverScans NoCastCrewDB RenameExisting > "%BackupPath%\Command.txt"
echo Close >> "%BackupPath%\Command.txt"
"C:\Program Files\DVD Profiler\dvdpro.exe" /CommandFile=%BackupPath%\Command.txt


cya, Mithi
Mithi's little XSLT tinkering - the power of XML --- DVD-Profiler Mini-Wiki
    Invelos Forums->DVD Profiler: Desktop Feature Requests Page: 1  Previous   Next