How to use Generic Timed File Backup Script for several locations Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
fun_9990
Posts: 47
Joined: 06 Oct 2017, 11:45

How to use Generic Timed File Backup Script for several locations

24 Nov 2017, 10:55

How to use Generic Timed File Backup Script for several locations
please see here :
https://autohotkey.com/board/topic/2952 ... up-script/

when we use must of two line
this code cannot copy and paste first line
this code can copy and paste our last line at all

Code: Select all

BackupInfo = c:\Program Files\AutoHotkey\*.txt|c:\MyBackup\AutoHotkey text files|1|0 
BackupInfo = %BackupInfo%?%A_MyDocuments%\desktop.ini|c:\MyBackup\destop.ini backup files|0|0|backup|A_Now 
; BackupInfo = %BackupInfo%?another source|another destination|1|1 
; BackupInfo = %BackupInfo%?another source|another destination|1|1 
; BackupInfo = %BackupInfo%?another source|another destination|1|1 
; BackupInfo = %BackupInfo%?another source|another destination|1|1 
; BackupInfo = %BackupInfo%?another source|another destination|1|1 
; etc...
for example when we use this code
BackupInfo = C:\Internet\*.*|D:\Internet\|1|1
BackupInfo = C:\Internet\*.*|E:\Internet\|1|1

this code can copy and paste our last line
BackupInfo = C:\Internet\*.*|E:\Internet\|1|1

How can we use several line and several copy and paste at once ?
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: How to use Generic Timed File Backup Script for several locations

24 Nov 2017, 11:12

I don't understand what you mean by copy paste, but you can have several lines in a string like this.

Code: Select all

BackupInfo =
(
C:\Program Files\AutoHotkey\*.txt|c:\MyBackup\AutoHotkey text files|1|0
%A_MyDocuments%\desktop.ini|c:\MyBackup\destop.ini backup files|0|0|backup|A_Now
)

MsgBox, % BackupInfo
Please excuse my spelling I am dyslexic.
fun_9990
Posts: 47
Joined: 06 Oct 2017, 11:45

Re: How to use Generic Timed File Backup Script for several locations

25 Nov 2017, 01:43

Capn Odin wrote:I don't understand what you mean by copy paste, but you can have several lines in a string like this.

Code: Select all

BackupInfo =
(
C:\Program Files\AutoHotkey\*.txt|c:\MyBackup\AutoHotkey text files|1|0
%A_MyDocuments%\desktop.ini|c:\MyBackup\destop.ini backup files|0|0|backup|A_Now
)

MsgBox, % BackupInfo
i test it

but my goal folders are empty !

what can i do ? i think your code have a problem

because when i use code like this

Code: Select all

BackupInfo =
(
C:\Program Files\AutoHotkey\*.txt|c:\MyBackup\AutoHotkey text files|1|0
)
this code is ok , but when i use must of one line like this

Code: Select all

BackupInfo =
(
C:\Program Files\AutoHotkey\*.txt|c:\MyBackup\|1|0
C:\Program Files\AutoHotkey\*.txt|c:\MySecondBackup\|1|0
)
this code cannot send files to the final routes
just me
Posts: 9453
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: How to use Generic Timed File Backup Script for several locations  Topic is solved

25 Nov 2017, 04:19

The backup script requires a question mark ? to separate multiple actions.

Code: Select all

; ----------------------------------------------------- 
;  Split backup paths from main string 
; -----------------------------------------------------
Loop, Parse, BackupInfo, ?

Code: Select all

BackupInfo =
(Join?
C:\Program Files\AutoHotkey\*.txt|c:\MyBackup\AutoHotkey text files|1|0
%A_MyDocuments%\desktop.ini|c:\MyBackup\destop.ini backup files|0|0|backup|A_Now
)

MsgBox, % BackupInfo

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: jameswrightesq, mikeyww and 332 guests