GoFrag Posted April 9, 2004 Share Posted April 9, 2004 Hello,I will making a btachfile thats copying Files from Drive H:\ to Drive d: .Bud i will that the Path is dependence from Dateso the script copied The Files from H:\DCIM\e4456\*.* to d:\eigene Dateien\bilder\%Date in YYMMDD Format%Bud we can a make it?Gofrag Link to comment Share on other sites More sharing options...
XtremeMaC Posted April 9, 2004 Share Posted April 9, 2004 ich denke, daB es helfen wurde, wenn sie es auf Deutsch schreiben. hm this far i know with german so u want to copy picture files having them with dates instead of the file name itself (which i think would be dcim) sony right?i think u might need to rename them first with some sort of batch renamer. Link to comment Share on other sites More sharing options...
mdes Posted April 9, 2004 Share Posted April 9, 2004 I already gave a solution @ http://www.msfn.org/board/index.php?showto...=0entry117846ps: there is a "Search" at the right top of each page of this forum Link to comment Share on other sites More sharing options...
GoFrag Posted April 9, 2004 Author Share Posted April 9, 2004 This thread i have found...bud I will make a folder in the Format yymmdd not dd.mm.yyyyso windows will not correctly sort the folders...And make this folder to a VariableSo i can use the Following command:xcopy32 h:\dcim\e345\*.* d:\eigene dateien\bilder\%Currentday%what i will is that the Foldersname will correctly sortet:040409040410040411040509050409Can anyone help me..?Thanks for your helpscuGofragSorry about my bad english... Link to comment Share on other sites More sharing options...
GoFrag Posted April 9, 2004 Author Share Posted April 9, 2004 oh bud i must read the Thread to the end... Link to comment Share on other sites More sharing options...
mdes Posted April 9, 2004 Share Posted April 9, 2004 @GoFrag: In fact, I edited my post to include the solution to your problem; so read again http://www.msfn.org/board/index.php?showto...=0entry117846 Link to comment Share on other sites More sharing options...
GoFrag Posted April 11, 2004 Author Share Posted April 11, 2004 Thanks!Great Work!cuGofrag Link to comment Share on other sites More sharing options...
GoFrag Posted April 11, 2004 Author Share Posted April 11, 2004 And this is the Result:==============================================@echo offset x=%date%set yy=%x:~8,2%set mm=%x:~3,2%set dd=%x:~0,2%set CURRENTDATE=%yy%%mm%%dd%If exist l:\DCIM\100MLT32 set Kamera=l:\DCIM\100MLT32If exist k:\DCIM\100MLT32 set Kamera=k:\DCIM\100MLT32If exist j:\DCIM\100MLT32 set Kamera=j:\DCIM\100MLT32If exist i:\DCIM\100MLT32 set Kamera=i:\DCIM\100MLT32If exist h:\DCIM\100MLT32 set Kamera=h:\DCIM\100MLT32If exist g:\DCIM\100MLT32 set Kamera=g:\DCIM\100MLT32If exist f:\DCIM\100MLT32 set Kamera=f:\DCIM\100MLT32If exist e:\DCIM\100MLT32 set Kamera=e:\DCIM\100MLT32If exist d:\DCIM\100MLT32 set Kamera=d:\DCIM\100MLT32Set Ladung=L1IF exist d:\eigene~1\bilder\%CURRENTDATE%\L1 set ladung=L2IF exist d:\eigene~1\bilder\%CURRENTDATE%\L2 set ladung=L3IF exist d:\eigene~1\bilder\%CURRENTDATE%\L3 set ladung=L4IF exist d:\eigene~1\bilder\%CURRENTDATE%\L4 set ladung=L5IF exist d:\eigene~1\bilder\%CURRENTDATE%\L5 set ladung=L6IF exist d:\eigene~1\bilder\%CURRENTDATE%\L6 set ladung=L7IF exist d:\eigene~1\bilder\%CURRENTDATE%\L7 set ladung=L8IF exist d:\eigene~1\bilder\%CURRENTDATE%\L8 set ladung=L9IF exist d:\eigene~1\bilder\%CURRENTDATE%\L9 set ladung=L10d:cd\eigene~1\bildermd %yy%%mm%%dd%xcopy %Kamera%\*.jpg d:\eigene~1\bilder\%CURRENTDATE%\%ladung% /V /C /I /FDEL %KAMERA%\*.* /F /S /Qexit==================================================Thanks for Help!cuGoFrag Link to comment Share on other sites More sharing options...
GoFrag Posted April 11, 2004 Author Share Posted April 11, 2004 Captain, i have a Problem....This Script functionally great..with Winxp...bud under Win98SE....No Way....The Second Line is the Problem...Set x=%date%This will not WorkGive it a Alternative?cuGoFrag Link to comment Share on other sites More sharing options...
mdes Posted April 11, 2004 Share Posted April 11, 2004 If DATE/T is accepted:SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSIONSET yy=FOR /F "USEBACKQ TOKENS=1-3 DELIMS=/" %i IN (`DATE /T`) DO ( SET dd=%i SET mm=%j SET yyyy=%k SET yy=%yyyy:~2,2%)SET yymmdd=%yy%%mm%%dd%set yymmddecho %yymmdd%Otherwise:First, create an empty file CRLF.TXT like:COPY CON: CRLF.TXT^Z (or Function key F6)then the code will be (replace "La" by the 1st word of the line where the date is displayed when typing DATE, probably "The" in English) :DATE >CURDATE.TXT <CRLF.TXTSET yy=FOR /F "TOKENS=1,6-8 DELIMS=:/ " %i IN (CURDATE.TXT) DO ( IF "%i" == "La" ( SET dd=%j SET mm=%k SET yyyy=%l SET yy=%yyyy:~-2% ))SET yymmdd=%yy%%mm%%dd%set yymmddecho %yymmdd% Link to comment Share on other sites More sharing options...
GoFrag Posted April 11, 2004 Author Share Posted April 11, 2004 Hello Mdes,Thanks for your Help!Also:I have no Idee how this work, bud i will do what you say....Also Date /T is not acceptedThe Second: under Winxp: %i can not be used at this point (Translated from Didaktisch).and under Win98SE stops the Prozess so I must break up...the CRLF.txt file i have created emptyWhat i do wrong?cuGoFrag Link to comment Share on other sites More sharing options...
mdes Posted April 11, 2004 Share Posted April 11, 2004 Sorry, but I do not understand what you mean If "DATE/T" is working under Win98, you should use only the 1st CODE (there is no need to create the empty file CRLF.TXT)If "DATE/T" is not working under Win98, you should:Create the empty file CRLF.TXTExecute the last CODEBUT: You should double the "%" to "%%" if you insert the code in a Batch (.CMD or .BAT) file. Link to comment Share on other sites More sharing options...
mdes Posted April 11, 2004 Share Posted April 11, 2004 Have a look at http://www.commandline.co.uk/lib/treeview/index.php Link to comment Share on other sites More sharing options...
mdes Posted February 4, 2005 Share Posted February 4, 2005 With WinXP, instead of `DATE /T`, you could also use '%DATE%'. (1) Beware backquotes and single quotes!(2) Check the format given by DATE/T to see which is the format: mm/dd/yyyy or dd/mm/yyyy) Link to comment Share on other sites More sharing options...
jaclaz Posted February 5, 2005 Share Posted February 5, 2005 I posted here:http://www.msfn.org/board/index.php?showtopic=37572&hl=A couple of complete examples.jaclaz Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now