AutoHotkey Community

It is currently May 27th, 2012, 6:33 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: March 30th, 2011, 4:31 pm 
Offline

Joined: March 30th, 2011, 3:32 pm
Posts: 5
Location: Houston
Hi all.
I've googled and read but I still need help.

The literature showed me how to copy a folder and it's contents to another destination via the script:

FileCopyDir, Source, Dest

It works well, but I need to run this command each day, and I want to keep archives, not overwrite the folder each time. So what I'd like, after copying the folder to the destination, is a script that would append a Date stamp to the folder name.

Thus: My_Folder
becomes: My_Folder20110330
or something similar.

I've looked at the "append" function, but it doesn't seem to work as I need it to.

Sincere thanks for any help.

Jase.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2011, 4:49 pm 
Did not try it but should be something like this:

Code:
Dest := MyFolder . A_YYYY . A_MM . A_DD
FileCopyDir,Source, Dest


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2011, 6:56 pm 
Offline

Joined: March 30th, 2011, 3:32 pm
Posts: 5
Location: Houston
Anonymous wrote:
Did not try it but should be something like this:

Code:
Dest := MyFolder . A_YYYY . A_MM . A_DD
FileCopyDir,Source, Dest


This is what I have:
Code:
FileCopyDir, Source_Folder, Destination_Folder . A_YYYY . A_MM . A_DD ,1


I end up with the folder named:
Destination_Folder . A_YYYY . A_MM . A_DD

It's not interpretting the date codes -- rather it's literally putting "A_YYYY" etc

Any thoughts on what I might be doing wrong?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2011, 7:20 pm 
use %% on variables


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2011, 7:31 pm 
Offline

Joined: February 27th, 2006, 5:55 pm
Posts: 24
Location: Italy
jase71ds wrote:
Anonymous wrote:
Did not try it but should be something like this:

Code:
Dest := MyFolder . A_YYYY . A_MM . A_DD
FileCopyDir,Source, Dest


This is what I have:
Code:
FileCopyDir, Source_Folder, Destination_Folder . A_YYYY . A_MM . A_DD ,1


I end up with the folder named:
Destination_Folder . A_YYYY . A_MM . A_DD

It's not interpretting the date codes -- rather it's literally putting "A_YYYY" etc

Any thoughts on what I might be doing wrong?


The correct sintax is:
Code:
FileCopyDir, Source_Folder, % "Destination_Folder" . A_YYYY . A_MM . A_DD ,1 


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 27th, 2011, 10:56 pm 
Offline

Joined: March 30th, 2011, 3:32 pm
Posts: 5
Location: Houston
[quote="WdbThe correct sintax is:
Code:
FileCopyDir, Source_Folder, % "Destination_Folder" . A_YYYY . A_MM . A_DD ,1 
[/quote]

Hey, many thanks. I implemented this and it works perfectly. Sorry it took me so long to return and say "thank you!"


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], JSLover and 66 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group