Source language: Translate to:

Change the date from a file

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Change the date from a file

Postby Alex » Sat May 09, 2009 6:33 am

Hello,

I want to know if they are a way or a plugin to change the date of the modification from a file, example:

Text.txt create the 01/01/2008, last modification the 12/03/2008 and last access the 12/03/2008.

Modified:

Text.txt create the 01/01/2008, last modification the 01/01/2008 and last access the 01/01/2008.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Sam Cox » Sat May 09, 2009 6:44 am

It's possible that the MS-DOS COPY command will do the job. Here's a Microsoft note explaining that COPY /B FILENAMEA +,, will update the time stamps. You can invoke the COPY command from Neobook.
-- Sam
User avatar
Sam Cox
 
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Postby Alex » Sat May 09, 2009 8:14 am

Hello Sam Cox,

Thank you for your answer.

I don't understand, where you write the date?
Code: Select all
COPY /B EXAMPLE +,,

?

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Sam Cox » Sat May 09, 2009 9:58 am

Hello Alex,
Try it yourself.

To be safe in experiments, I made a copy of a file with out-of-date time stamps. In my case, I created a copy of a PDF file and named the copy X.PDF and verified (via Right-Click > Properties) that the time stamps are not current. The full path to my file is C:\Documents and Settings\Owner\My Documents\x.pdf.

I opened a CMD window (Start > Run > "CMD" > Ok) and executed these commands:

1) CD "C:\Documents and Settings\Owner\My Documents"
2) copy /b x.pdf +,,

Via Right-Click > Properties, I verified that the modified time stamp changed to today's date.

Experimenting, I noticed that executing copy /b "C:\Documents and Settings\Owner\My Documents\x.pdf" +,, did not change the time stamps. Apparently you must be in the file's host directory for the command to work.

-- Sam
User avatar
Sam Cox
 
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Postby Alex » Sat May 09, 2009 12:01 pm

Hello Sam Cox,

Thank you for your trying.

I want to change the date, but write any date, example 01/12/1998.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Sam Cox » Sat May 09, 2009 12:51 pm

Sorry then -- no can help.
-- Sam
User avatar
Sam Cox
 
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Postby Rasl » Sat May 09, 2009 4:18 pm

Try dec_plus

salu2
Rasl
 
Posts: 129
Joined: Sat Apr 02, 2005 8:25 am
Location: Buenos Aires, Argentina

Postby Alex » Sat May 09, 2009 9:51 pm

Hi Rasl,

Thank you for your answer.

But I can only get the date, I can't modify and write any date.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby HPW » Sat May 09, 2009 10:21 pm

There are also commandlinetools:

http://www.datamystic.com/dirdate.html

(Not free)
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Alex » Sun May 10, 2009 2:06 am

Hello HPW,

Excellent, thank you.


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Rasl » Sun May 10, 2009 7:27 am

In spanish

dec_EstablecerFechaDeArchivo "yourfile" "01/01/2009"

(set file date)

salu2
Rasl
 
Posts: 129
Joined: Sat Apr 02, 2005 8:25 am
Location: Buenos Aires, Argentina

Postby Alex » Sun May 10, 2009 7:41 am

Hi Rasl,

Thank you for your message, it works too.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest