Help!

PC-Problemen?
De vrijwilligers van Oplossing.be zoeken gratis met u mee!

Hulp bij posten

Recente topics

Auteur Topic: Batch file - bestandsnaam met datum  (gelezen 3843 keer)

0 leden en 1 gast bekijken dit topic.

Offline Myclos81

  • Ervaren lid
  • ***
  • Berichten: 272
  • Oplossing.be
Batch file - bestandsnaam met datum
« Gepost op: 19 januari 2016, 13:57:33 »
Beste

ik heb een batch bestand die een xls genereert van een .rpt (Crystal Report) file.
Daar zou ik voor de .xls een datum willen aan toevoegen met formaat yyyyMMdd.

Nu heb ik al vanalles geprobeerd maar lukt me eerst en vooral niet om het juiste formaat van de datum te krijgen.
Heb al geprobeerd met %datum% en %date% maar dit neemt hij niet.

Ben een leek in dit soort batch bestandjes. Kan iemand me op weg helpen ?
P4VT8+ , GeForce 6200, Windows XP Prof SP2, Intel(R) Pentium(R) 4 CPU 2.80GHz, 768 MB RAM, HDD:80 + 80 GB, NTFS, telenet, AVG antivirus, Internet Explorer 6.0, Outlook Express

Offline dizzl

  • Ambassadeur
  • *****
  • Berichten: 2.345
  • I've Upped my standards,now,up yours!
Re: Batch file - bestandsnaam met datum
« Reactie #1 Gepost op: 19 januari 2016, 17:47:32 »
kan je het batch bestand eens doorsturen met een vb rpt?
Systeem  : Intel Core i5-4440 3.1Ghz, 3.1GHz 16Giga Ram 64Bits
Software : Windows 10 professional, Avira, Office 2016 Professional

Offline Myclos81

  • Ervaren lid
  • ***
  • Berichten: 272
  • Oplossing.be
Re: Batch file - bestandsnaam met datum
« Reactie #2 Gepost op: 20 januari 2016, 13:09:47 »
Dag Dizzl

is reeds opgelost met:

%date:~9,4%%date:~6,2%%date:~3,2%
Dat geeft dan 20160120 die ik aan mijn bestandsnaam plak.
P4VT8+ , GeForce 6200, Windows XP Prof SP2, Intel(R) Pentium(R) 4 CPU 2.80GHz, 768 MB RAM, HDD:80 + 80 GB, NTFS, telenet, AVG antivirus, Internet Explorer 6.0, Outlook Express

Offline dizzl

  • Ambassadeur
  • *****
  • Berichten: 2.345
  • I've Upped my standards,now,up yours!
Re: Batch file - bestandsnaam met datum
« Reactie #3 Gepost op: 20 januari 2016, 15:19:34 »
Hé Myclos,

Leuk dat het opgelost is. Ik had graag gezien hoe je met een batchfile een excelletje maakt ;-)
Systeem  : Intel Core i5-4440 3.1Ghz, 3.1GHz 16Giga Ram 64Bits
Software : Windows 10 professional, Avira, Office 2016 Professional

Offline Myclos81

  • Ervaren lid
  • ***
  • Berichten: 272
  • Oplossing.be
Re: Batch file - bestandsnaam met datum
« Reactie #4 Gepost op: 20 januari 2016, 15:49:34 »
Dag Dizzl

met volgend programmaatje lukt het wonderwel. Zie uitleg ook op site:

https://rainforestnet.com/crystal-reports-exporter/how-to-use.html  ;)
P4VT8+ , GeForce 6200, Windows XP Prof SP2, Intel(R) Pentium(R) 4 CPU 2.80GHz, 768 MB RAM, HDD:80 + 80 GB, NTFS, telenet, AVG antivirus, Internet Explorer 6.0, Outlook Express

Offline dizzl

  • Ambassadeur
  • *****
  • Berichten: 2.345
  • I've Upped my standards,now,up yours!
Re: Batch file - bestandsnaam met datum
« Reactie #5 Gepost op: 20 januari 2016, 18:12:14 »
bedankt ;-)
Systeem  : Intel Core i5-4440 3.1Ghz, 3.1GHz 16Giga Ram 64Bits
Software : Windows 10 professional, Avira, Office 2016 Professional

 


www.combell.com